Pugjs length3/13/2024 If the data is already sorted by the date, try: -Ĭonst calendar_events = [ I'll leave here this CodePen link, with the html version, because I think you guys can get the main idea of my question: The problem is that I get a duplicate for each entry in October, because I have to start the iteration on the first line: each event in calendar_events. var month = str.split(separator, 2).pop() // 10 ![]() I would like to make this without having to add an extra field, to select again a "month", which could bring bugs in case the selected month is not the same as on the date field (to be able to list the events, if does it makes sense)?įor now, I am on this step: each event in calendar_events On the backend I am just having a title field and a date field for each event. After listing the events for that month, I have to close that and start a new one for the next month. ![]() I am building an "Events List" in PugJS and I am going through each event and I would like to add a html element, like this, for each month.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |