Calendar component and dateFormat bug

Hello,

I’ve encountered a strange bug on the calendar component regarding the date it returns when I apply a dateFormat() onto it’s “Immediate Date” property.

It looks like it updates the year a bit too soon, jumping for example from the 27th of December 2025 to the 28th of December 2026. The following days are also in the wrong year before going to January. In the attached pictures you can find what I expose (down-left part of the pictures - up is the date simply reported, down is the formatted date). Is it because of the week counting ?

Best regards

This is probably because somewhere in the scripts is a date conversion using YYYY-MM-dd instead of yyyy-MM-dd giving you the week date instead of the true date. I would check the binding on that label and see where it's coming from.

2 Likes

This kind of question pops up every year about this time, since "week year" typically changes to the new year "early". Take a closer look at the docs for date formatting characters.

2 Likes

See dateFormat returning the wrong year - #7 by Transistor and the rest of the thread.

2 Likes