green icon indicating copy to clipboard operation
green copied to clipboard

Datepicker: Allow setting timezone offset

Open splashdust opened this issue 2 years ago • 0 comments

By default, the Datepicker emits a Date object with the time set to 00:00 local time. In some cases it may be desirable to select dates dates in different time zone offset.

The API for this could look something like this:

<!-- Explicitly select dates in CET time -->
<gds-datepicker
  utc-offset="+1"
></gds-datepicker>

~~I think it will still make sense to always default to setting the hours and minutes of the Date object to 00:00. If you need a different time you can always just add xx:xx to that date.~~

Update: Time component should be set to 12:00 by default.

Related to #1227

splashdust avatar Mar 08 '24 09:03 splashdust