You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the date time picker in the datetime widget, upon selecting a PM time (e.g. 17:30), the preview incorrectly displays a 12-hour AM equivalent (e.g. 05:30).
Upon saving the CMS collection item, the correct value is saved to the .md file.
However, upon opening the file again in the editor, the date time picker is incorrectly populated with the 12-hour equivalent time again, and re-saving the entry therefore saves the incorrect time.
To Reproduce
Edit item with a field with widget 'datetime'
click to init the date time picker
select a PM tie e.g. 17:30
Observe that the preview incorrectly says 05:30
Save the item
Observe the saves value is correctly 17:30
click to launch the datetpicker again
observe that the init value in the picker is incorrectly 05:30
Expected behaviour
The preview for the time should match the AM/PM/24hour clock version of the selected time.
The init value in the date picker should not format the time to a 12-hour clock value.
value={dayjs(value).format('YYYY-MM-DDThh:mm')} in the Control seems to cause a conversion to the 12-hour equivalent time.
Describe the bug
When using the date time picker in the datetime widget, upon selecting a PM time (e.g. 17:30), the preview incorrectly displays a 12-hour AM equivalent (e.g. 05:30).
Upon saving the CMS collection item, the correct value is saved to the .md file.
However, upon opening the file again in the editor, the date time picker is incorrectly populated with the 12-hour equivalent time again, and re-saving the entry therefore saves the incorrect time.
To Reproduce
Edit item with a field with widget 'datetime'
click to init the date time picker
select a PM tie e.g. 17:30
Observe that the preview incorrectly says 05:30
Save the item
Observe the saves value is correctly 17:30
click to launch the datetpicker again
observe that the init value in the picker is incorrectly 05:30
Expected behaviour
The preview for the time should match the AM/PM/24hour clock version of the selected time.
The init value in the date picker should not format the time to a 12-hour clock value.
value={dayjs(value).format('YYYY-MM-DDThh:mm')}
in the Control seems to cause a conversion to the 12-hour equivalent time.Applicable Versions:
CMS configuration
- { label: "End Date", name: "dateend", widget: "datetime" }
Additional context
I believe the docs still refer to momentjs config vs. dayjs.
The text was updated successfully, but these errors were encountered: