-
Goal: I have a "Month" Dropdown which sets a variable 'viewMonth'. This variable 'viewMonth' is used in a calendar as a 'defaultDate' to be displayed. On Desktop and any browser on android this works fine: When I select a specific month in the dropdown this specific month will be displayed in the calendar.
On iOS however the calendar view doesn't change. -
Details:
-
Screenshots:
-
App json export:
dataEntry.json (207.4 KB)
Hi @boernard, thank you for surfacing this! I was able to reproduce it on my end. We created the internal bug report for this issue and will update you here when it is fixed.
Update:
Just kidding, no bug.
Please read the post below.
Hi @boernard, thanks for providing a JSON export!
I believe this might be a similar issue to MomentJs not working on mobile browser on device, where input that does not follow the ISO 8601 format (YYYY-MM-DD
) is causing some inconsistencies across devices/browsers.
In your case, it looks like you are setting the value to be
viewedMonth.setValue(moment(year1.selectedItem + '-' + month1.selectedItem.value + '-' + '01').toDate() )
Which would output something like 2025-1-01
, but it might actually need to be 2025-01-01
in order for the date to be parsed correctly. I would try updating your select to use two-character strings for the months (01
, 03
, 12
, etc. instead of 1
, 3
, 12
) to see if that fixes it!
Awesome, that works! Interesting (=stupidly annoying) behaviour, thanks for surfacing this!