haiilo / catalyst

A framework agnostic design system and component library based on web components and SCSS.
https://haiilo.github.io/catalyst/
MIT License
8 stars 7 forks source link

Cat-datepicker datetime shows a time different from the real value in the input #388

Closed geralrodrigues closed 1 year ago

geralrodrigues commented 1 year ago

image-20230927-103932

In the screenshot it can be seen the value of the element (00:00) that differs from the value selected in the input (01:00).

The problem seems to be related to the use of Date in flatpickr instead of user timezone.

More info in this thread Timezone · Issue #930 · flatpickr/flatpickr

geralrodrigues commented 1 year ago

Additional information: only occurs when the mode is datetime, there always seems to be a difference of 1 hour.

https://github.com/haiilo/catalyst/assets/100929087/33103aaa-d136-4262-be8d-1ba014395cd3

fynnfeldpausch commented 1 year ago

Double checked. Datepicker behaves correct and always returns the selected time as a UTC timestamp (hence the offset).