Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Setting Locale in DatePicker Components #727

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

SimonPavlik
Copy link

@SimonPavlik SimonPavlik commented Dec 30, 2019

Introducing a new language property used to set locale in DatePickerSingle and DatePickerRange components.

  • Passing the default parameter auto will pick the browser's default language to set the locale.
  • For example: language='en' sets the default locale of these components globally to English.
  • Caveat: The same locale needs to be set for all DatePicker components located on the same page
  • This limitation is caused by the fact that the locale is being set globally using Moment.js - a peer dependency of react-dates.

This PR resolves #579 and https://community.plot.ly/t/changing-calendars-langage-to-french/19983.

@roskoN
Copy link

roskoN commented Mar 24, 2020

Hey,

I do have a great interest in moving this forward.

Is there any way I could help? Are the unit-tests the only thing that is blocking this PR?

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: DateRangePicker locale
2 participants