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

Using partial locale #2345

Closed
LWJerri opened this issue Aug 4, 2024 · 1 comment · Fixed by #2348
Closed

Using partial locale #2345

LWJerri opened this issue Aug 4, 2024 · 1 comment · Fixed by #2348
Assignees

Comments

@LWJerri
Copy link

LWJerri commented Aug 4, 2024

Code

import { DayPicker } from "react-day-picker";

export function Start() {
  return (
    <DayPicker
      mode="range"
      locale={{ code: "ru" }}
      weekStartsOn={1}
      max={7}
      selected={selectedDate}
      onSelect={handleClickOnDate}
    />
  );
}

Expected Behavior

Property locale must have all fields as optional.

Actual Behavior

Can't just change localization in locale.

Screenshots

image

@gpbl
Copy link
Owner

gpbl commented Aug 4, 2024

@LWJerri interesting, I see the reason of passing a partial locale there.

@gpbl gpbl changed the title Can't change only localization Using partial locale Aug 4, 2024
@gpbl gpbl self-assigned this Aug 4, 2024
@gpbl gpbl linked a pull request Aug 4, 2024 that will close this issue
@gpbl gpbl closed this as completed in #2348 Aug 4, 2024
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 a pull request may close this issue.

2 participants