Skip to content
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: new timeZone prop (experimental) #2467

Merged
merged 15 commits into from
Sep 19, 2024
Merged

feat: new timeZone prop (experimental) #2467

merged 15 commits into from
Sep 19, 2024

Conversation

gpbl
Copy link
Owner

@gpbl gpbl commented Sep 18, 2024

Screenshot 2024-09-18 at 7 08 19 PM

@gpbl gpbl changed the title Add experimental timezone support feat: new timeZone prop (experimental) Sep 19, 2024
@gpbl gpbl marked this pull request as ready for review September 19, 2024 12:02
@gpbl gpbl merged commit b5e554a into main Sep 19, 2024
10 checks passed
@gpbl gpbl deleted the gpbl/experimental-tz branch September 19, 2024 12:11
kodiakhq bot referenced this pull request in technifit/tasker Sep 19, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [react-day-picker](https://daypicker.dev) ([source](https://redirect.github.com/gpbl/react-day-picker)) | [`9.1.0` -> `9.1.1`](https://renovatebot.com/diffs/npm/react-day-picker/9.1.0/9.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-day-picker/9.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-day-picker/9.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-day-picker/9.1.0/9.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-day-picker/9.1.0/9.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>gpbl/react-day-picker (react-day-picker)</summary>

### [`v9.1.1`](https://redirect.github.com/gpbl/react-day-picker/releases/tag/v9.1.1)

[Compare Source](https://redirect.github.com/gpbl/react-day-picker/compare/v9.1.0...v9.1.1)

This release improves reliability for controlled mode and adds experimental support for time zones.

#### Time Zone Support

By integrating the [@&#8203;date-fns/tz](https://redirect.github.com/date-fns/tz) utilities for handling time zones, we have added a new experimental `timeZone` prop. Please see the [updated docs](https://daypicker.dev/docs/localization#time-zone) for more details.

```tsx
import { DayPicker, TZDate } from 'react-day-picker';
<DayPicker 
    timeZone="Europe/Athens"  // set the time zone
    disabled={TZDate.tz("Europe/Athens")}  // make sure you use `TZDate` to initialize dates
/> 
```

> \[!NOTE]
> If you were using the experimental `react-day-picker/utc` module, you can skip now it. Remove the `@date-fns/utc` package and just pass `timeZone="UTC"` to `<DayPicker />`.

#### What's Changed

-   fix: make sure internal state is not updated in controlled mode by [@&#8203;gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2473](https://redirect.github.com/gpbl/react-day-picker/pull/2473)
-   feat: new `timeZone` prop (experimental) by [@&#8203;gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2467](https://redirect.github.com/gpbl/react-day-picker/pull/2467)
-   feat: export locales from `react-day-picker/locale` by [@&#8203;gpbl](https://redirect.github.com/gpbl) in [https://github.com/gpbl/react-day-picker/pull/2474](https://redirect.github.com/gpbl/react-day-picker/pull/2474)

**Full Changelog**: gpbl/react-day-picker@v9.1.0...v9.1.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/technifit/tasker).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant