title | issue |
---|---|
Fix wrong time setting in datepicker component |
NEXT-11082 |
- Changed method
createConfig
insrc/app/component/form/sw-datepicker/index.js
to use ISO Date format when usingdatetime-local
type - Changed
dateType
of release date field insrc/module/sw-product/component/sw-product-settings-form/sw-product-settings-form.html.twig
in order to use date time from user's browser
According to document of flatpickr (https://flatpickr.js.org/formatting/), ISO Date format is now supported for datepicker component
With datetime-local
date type, the datepicker will display to user their browser time and convert to UTC value
- Both dateType
datetime
anddatetime-local
use UTC timezone(GMT+00:00)
- If user select date
2021-03-22
and time12:30
, the output is2021-03-22T12:30:000+00:00
- With dateType
datetime
, user select date2021-03-22
and time12:30
, the output is2021-03-22T12:30:000+00:00
- With dateType
datetime-local
, user select date2021-03-22
and time12:30
and timezone of user isGMT+07:00
, the output is2021-03-22T05:30.00.000Z