Checking for datetime = datetime not working as intended

Hi!

I’ve made a calendar which i intend to populate with tasks. However, to get the right task for the right day, I check the deadline datetime (set to end of day) agains the calendar datetime (seems to be set to end of day). This however does not work. None of the tasks show up, even though it looks like it has the same datetime.

I know of a workaround, but I’m more interested in why this doesn’t work and how the calendar object type initializes data

Edit: I do not know of a workaround, so I appreciate any solution to this problem

Calendar object:

Taks object set to 1.1.2025 end of day

Filter:

Hi!

Could you provide a bit more context on where this Filter is set up? I can see that the Tasks data source is filtered and that you try to filter Tasks based on the selected or context Calendar - Days in Month object. But is the filter on a data source in App Data, the UI Editor or inside a task? A screenshot might help.

For this filter to work: The filter must either be inside a repeating construction of the Calendar - Days in Month data source (e.g. iterating container or For-each action node), or the Calendar - Days in Month Data Source must have 1 selected object - since you are using the equals operator indicating a “cardinality one” right side filter operand.

Calendar data sources are populated on app load, or when the From / To (the “Filter” on the Data Source)

The filter is on an iterating container. It is built like this:

  • Iterate calendar - weeks in month (vertically)
    • Iterate calendar - days in month (horisontally) - Filter for daysInMonth.weekNumberISO == weeksInMonth.weekNumberISO
      • Iterate tasks

So the tasks are iterated within a container that has a “day”-object in context. So I want to display all tasks for that specific day. The filter is on the iteration of the task data class

1 Like

Furthermore I’m pritty sure it is the dates that are wrong, not my logic. I’ve created a drag an drop function that sets the date of the task equal to the calendar object in context. This works, and as you can se below, the tasks are displayed in the right container

Hi!

I tried the same setup:

…with the latter filter defined on a repeating container relating the TODO Item Test inside a repeating container repeating the Calendar data source. And it works just as expected.

Not sure how to approach this one further. I believe the issue is not general, but something else. ou might isolate the case to a new “Dev only” app with just this same setup there to see if you are able to reproduce it (and if so, let me know). Or do some console log inside that repeating container (e.g. a visibility condition doing a console log of the properties and objects in context) to try to figure out what is actually happening.

I was using the datetimeValue property of the calendar object, which is set to “start of day”.

My bad