I’m trying to build a calendar-style timeline for an internal tool I’m making but I’m struggling trying to show just one date if there are two “posts” created on that day.
Here’s a design to better explain what I’m talking about -
When I use a repeating group, and “Do a search for Posts” I get all of the posts but there’s no way to “bunch” dates with the same “created on” and show just one day. I’ve looked on the forum and came across a promising answer by @mikeloc - Remove multiple dates in repeating group - but it’s just too hacky for that I’m trying to do. I’m wondering if there’s a better way of approaching this problem, even using a Calendar type plugin, but after two days I’m still stuck so I’m hoping someone’s got a better idea out there?
Thanks to the parenthesis feature you can simply use the following conditional:
Repeating Group's: list of items's: item# (current cell index - 1): date: rounded down to day: is not : Current cell's thing's date rounded down to day
Set the date element to invisible by default, and set it to visible with the above conditional.
Sorry I didn’t have a Bubble editor open and I just went by memory.
I forgot that you cannot use the ‘is not’ operator on dates. Instead you can use the ‘equals rounded down to…’ operator ( FYI this operator rounds down both dates).
As you can imagine, this operator does the opposite of ‘is not’. You could set the element as visible by default and hide it if the conditional is true, however i prefer to do the opposite; keep hideable elements hidden by default and conditionally show them. This avoids the issue of ‘flashing’ elements. To do this, just invert the conditional by placing ‘format as number: is 0’.
Current cell’s thing was just an abstraction. As long as you are inputting the date corresponding the current cell, you’re in the clear.
So your Expression would then become
(RepeatingGroup Post's List of Posts item# (Current cell index-1))'S Creation Date equals rounded down to day: Parent Group's Posts Creation Date):format as number: is 0