-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Localising @blueprintjs/datetime2 components in React 18 #5652
Comments
@alexpartsch good question, thanks for reporting this detailed issue.
This seems plausible to me, but I haven't tried this. Does react-day-picker v7 not render properly with React 18? We've been a bit slow to upgrade react and react-day-picker in Blueprint. I will try to prioritize upgrading react-day-picker in the next few weeks so that we can unblock React 18 support. |
@adidahiya I guess react-day-picker v7 depends on an older version of react:
|
@adidahiya do you have any progress on upgrading react-day-picker? |
Nope, sticking with it. |
I would really like this as:
|
@ryanhamilton yep, I hear you, and I'm bumping the priority on this task. Lately I've been busy migrating our large internal codebases to prepare for Blueprint v5, but this is the next most important task in my queue. It's definitely important for us to stay up-to-date in the React ecosystem. |
So is there a duedate for version 5? The wiki says "late 2022" :-) |
I've started some work on upgrading to react-day-picker v8 in #5935. It's not a simple upgrade for us, and I can't afford to pile in more breaking changes to v5.0. But I'd like to have something working for React 18 users as a "v2" Blueprint API while leaving react-day-picker v7 support intact in the "v1" components. This should be doable with a few more days of work, hopefully by the end of this month. |
@adidahiya Hey, what is the status of this bug? |
When will this be fixed? |
You can use the new "v3" components in @blueprintjs/datetime2 v2.x for react-day-picker v8 support. |
@adidahiya Awesome! I guess I still have to install it with |
@alexpartsch oh, that's a bug. The package should allow react 18 as a peer dep. I removed the |
Environment
Question
I'm trying to localise my
DateRangeInput2
control to the german language. Based on the linked documentation to the olddatetime
package one needs to importLocalUtils
fromreact-day-picker
and apply it to thelocalUtils
property together with a language code inlocale
to the component:Since I'm in a typescript project, just applying that gives me:
Suppressing it with
// @ts-ignore
gives me:After installing it
react-day-picker
, it claims there's no class calledLocalUtils
:So I checked with the
@blueprintjs/datetime2
spackage.json
and tried to install the required version ofreact-day-picker
:7.4.9
.Upon installation npm returned me the dependency resolving error:
For info, I'm using
react@^18.2.0
, therefore it's not compatible with older versions ofreact-day-picker
.I could not find till which version
LocalUtils
was available inreact-day-picker
.I know it's more off a typescript question than BlueprintJS specific, but could anyone get localisation for
datetime2
working in React 18? Thanks!The text was updated successfully, but these errors were encountered: