Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Problem selecting presets in non-English locales #80

Open
laynegt opened this issue Jun 28, 2017 · 3 comments
Open

Problem selecting presets in non-English locales #80

laynegt opened this issue Jun 28, 2017 · 3 comments

Comments

@laynegt
Copy link

laynegt commented Jun 28, 2017

Ran into a strange issue today when testing i18n changes in French. Might be related to #73.

The issue is that calendarCheckDate is erroneously creating a valid moment in some non-English locales (at least when using the default date format of MMMM D, YYYY). In my case, that meant all my preset dates were turning into Jan 20th. Seems like it could be a bug in moment (didn't see any after a cursory check).

Here are some examples (using moment) of the behavior I'm seeing.

Can the preset click handler just directly create moments instead of calling calendarCheckDate? Seems like the presets will always produce ISO 8601 date strings. This seemed to have fixed it in my fork.

Thanks.

@kalepail
Copy link
Contributor

kalepail commented Jul 4, 2017

Thanks for bringing up the issue. I'll have to take a better look once I get some time but it looks like ensuring those dates are moment dates could potentially solve the problem.

@kalepail kalepail self-assigned this Jul 4, 2017
@melnikoved
Copy link

Hello!
Do you have any progress? I found that the fix in @laynegt fork works right.

@kalepail kalepail removed their assignment May 30, 2018
@ETIBER
Copy link

ETIBER commented Sep 21, 2018

I've also this situation

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

No branches or pull requests

4 participants