-
Notifications
You must be signed in to change notification settings - Fork 186
feat(Calendar,DateInput): add prop timezone #8331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Calendar,DateInput): add prop timezone #8331
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
size-limit report 📦
|
e2e tests |
👀 Docs deployed
Commit 7333f08 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8331 +/- ##
==========================================
- Coverage 95.46% 95.41% -0.05%
==========================================
Files 406 407 +1
Lines 11610 11581 -29
Branches 3844 3821 -23
==========================================
- Hits 11083 11050 -33
- Misses 527 531 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вижу, что ещё draft, так что просто вопросик!
Классно, что так быстро взялся!
# Conflicts: # packages/vkui/src/components/Calendar/Calendar.stories.tsx # yarn.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💅
# Conflicts: # packages/vkui/src/components/Calendar/Calendar.tsx # packages/vkui/src/components/DateInput/DateInput.tsx
Описание
В некоторых ситуациях нужно время в компонентах DateInput и Calendar отображать в специфичной таймзоне. Нужно добавить свойство
timezone
для этих компонентовИзменения
Поисследовал тему
timezone
и понял, что для компонентовDateRangeInput
иCalendarRange
свойствоtimezone
не имеет смысла, так как в них не отображается время.Также, чтобы работать с таймзонами, используя
date-fns
, нужно подключить библиотеку date-fns-tzCalendar
иDateInput
свойствоtimezone
Release notes
Улучшения
timezone
для отображения времени в нужной таймзонеtimezone
для отображения времени в нужной таймзоне