Conditional date headers?

My app includes a list of upcoming events.

Each item has a title, date, and time. Some days, there will be several events, and some days have no events.

Instead of showing the date in each item in the list, I’d like to show a ‘date header’ followed by all the events for that date, then another ‘date header’ followed by that date’s events, etc. Something like this:

6 MAR

  • 9 AM This is an event
  • 11 AM This is an event
  • 2 PM This is an event

8 MAR

  • 10 AM This is an event
  • 11 AM This is an event
  • 4 PM This is an event

There was nothing scheduled for 7 March, so no header was needed.

I know how to display all the time/name items in order. But how do I insert the date headers within that list, so they only appear when there are events scheduled for that date?

Hey there @MikesClub

Like this:

I may be misunderstanding your instructions, but I don’t think this does what I want to do.

The screen looks like this:

But, since there are two events on Friday April 1, the second header should not appear. I’m trying to display:

Thursday March 31
Event
Friday April 1
Event 1
Event 2
Wednesday April 13
Event

There should be no date header between the two events on April 1.

Hi @MikesClub you are listing the events, but you need to list the calendar and then put inside a list with the events for each day filtering day is equal that the current calendar date.





Captura de pantalla 2022-03-23 a las 12.22.14 a.m.

I hope this helps you.
Sorry for my English.

1 Like

Are you sure? :sunglasses:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.