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![image](https://github.com/decaporg/decap-cms/assets/235729/1e758b6f-9e9e-4dd4-8fdd-6e517164385b)
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![image](https://github.com/decaporg/decap-cms/assets/235729/3c1049de-d75b-4fcc-aa6f-30afa49ffbe5)
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
Additional context I believe the docs still refer to momentjs config vs. dayjs.