I have created a block list which use a block element that has 2 date only fields: dateFrom and dateTo.
In the blocklist label i have set: From ${dateFrom} to ${dateTo}
But i get:
From \[object Object\] to \[object Object\]
I have tried adding toString()${dateFrom.toString()} and many other things but i cant get the value.
I would like to get the date and format it as from 1 january 2025 to 1 febrary 2025
Though this will simply take the toString() representation of the object, so a date picker will give “2026-01-12 00:00:00” which we prob don’t want to see the timepart…
I wonder if it’s anything to do with date formats and the conversion to UTC in 17 for storage in the DB? (if you’ve update to 17 rahter than started in 17?)
Not sure if your date 01/02/2026 is february or still intended to be January? though saying that 01/01/2026 should be valid either way…
Maybe the easiest way to trouble shoot is that custom ufm filter/component and then you can breakpoint to see what’s going on?
Seems there might be 2 date pickers here.. I’m using the Picker → DatePicker
If I change over to the Date → Date Picker, I start to see [Object object], prob as this picker seems to store { "date": "2026-01-13", "timeZone": null }
And not just a UTC string representation of a date… which I think that what’s UFM is after for .toJSON() to work on a utc date?