Skip to content

[bug]: DateTimePicker changes date automatically (only for some timezones?) #1223

Closed
@alimpens

Description

@alimpens

What version of strapi-design-system are you using?

  • Strapi Design System version: 1.8.1

What's Wrong?

When selecting a date in the DateTimePicker, that date minus one day is shown in the UI. If you click on the corresponding label, another day is subtracted from the date.

Possibly related to timezones and this PR for the DatePicker. I'm in the GMT+2 timezone.

To Reproduce

  • Go to the DateTimePicker in Storybook
  • Select today's date
  • See that yesterday's date is show in the UI
  • Click on the 'Publish at' label
  • See that another day is subtracted in the UI

Possibly related to the users timezone. I'm in GMT+2

Expected Behaviour

I expect the date I pick to be shown in the UI, and for it not to change when I click the label.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions