Replies: 4 comments 2 replies
-
Hi @daveallie , To localize DayPicker: - return <DayPicker dateLib={dateFns} mode='single' />;
+ return <DayPicker locale={enAU} mode='single' />; |
Beta Was this translation helpful? Give feedback.
-
Using Taking a quick look at the code, it looks like the crux of the issues is that unmodified
So if the |
Beta Was this translation helpful? Give feedback.
-
I have put up a PR explaining a little more and addressing the issue: #2523 A little more than the 1 line fix I suggested, but IMO this is a necessary change to ensure that all references to |
Beta Was this translation helpful? Give feedback.
-
Fixed with #2550. |
Beta Was this translation helpful? Give feedback.
-
Code
Expected Behavior
I would expect the weekday column headers to correctly match up with the dates in the grid as pictured below:
locale explicitly set to
enAU
(locale={enAU}
):locale explicitly set to
enUS
(locale={enUS}
):Actual Behavior
When
dateFns
is supplied as thedateLib
and has been setup with the default locale ofenAU
, the weekday headers render asenUS
, but the grid renders asenAU
, resulting in incorrect weekdays lining up with dates:Beta Was this translation helpful? Give feedback.
All reactions