From 7e5a11ec7d32aeab03f6c9632ae6402383fa1410 Mon Sep 17 00:00:00 2001 From: Lebaud Antoine Date: Mon, 24 Jul 2023 22:24:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D(react)=20add=20a=20timezone=20mana?= =?UTF-8?q?gement=20section=20to=20date=20picker=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Describe the current behavior of date picker components, especially with the recent changes in component's API. --- packages/react/src/components/Forms/DatePicker/index.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/react/src/components/Forms/DatePicker/index.mdx b/packages/react/src/components/Forms/DatePicker/index.mdx index 07aefc2..7544f61 100644 --- a/packages/react/src/components/Forms/DatePicker/index.mdx +++ b/packages/react/src/components/Forms/DatePicker/index.mdx @@ -132,6 +132,15 @@ By default, the DatePicker component uses the CunninghamProvider locale. +## Timezone management + +By default, the component uses the user's local timezone. When a timezone is passed, dates are selected at midnight in that specific timezone. +If a value or default value is provided, the component preserves the time unless the user clears the input. +When the input is cleared, the dates are reset to midnight in the current timezone. +The component accepts both UTC date-time strings and date-time strings with offsets from UTC. +However, it consistently returns the output in UTC time, ensuring uniformity across different timezone. + + ## Props You can see the list of props below.