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

Calendar locale #1376

Closed
arjarn opened this issue Jun 3, 2019 · 6 comments
Closed

Calendar locale #1376

arjarn opened this issue Jun 3, 2019 · 6 comments
Labels
Milestone

Comments

@arjarn
Copy link

arjarn commented Jun 3, 2019

I'm using calendar picker like this :

<input id="mdatedeb" data-role="calendarpicker" 
                 data-input-format="dd/mm/yyyy" value="25/10/2019"
                 data-format="%d %B %Y" />

and adding in header.

When my page is displaying, date are in US mode but if I display calendar, it's french mode (if I choose another date, date is in french mode too).

Perhaps I'm missing something ?

@olton
Copy link
Owner

olton commented Jun 3, 2019

check data-locale attribute, meta:locale meta tag ?

@arjarn
Copy link
Author

arjarn commented Jun 3, 2019

I've :

<meta name="metro4:locale" content="fr-FR">

@olton
Copy link
Owner

olton commented Jun 3, 2019

By default, calendar picker use METRO_LOCALE global var, This variable init from meta tag metro4:locale.
Use data-locale="en-US" attribute for calendar picker to set to en-US

@arjarn
Copy link
Author

arjarn commented Jun 3, 2019

In fact, I want FR calendar, it's why I'm using metro4:locale with fr-FR value.
But when my page is displaying (with default values set for calendar), calendar format is en-US

My draft page : https://sandbox.org.ua/arjarn/code/azbM3YfemW

See first date : "May" is showing, if you click on calendar "Mai" (in french)

@olton
Copy link
Owner

olton commented Jun 3, 2019

I see: initial value in US, after select date - in FR. Ok, I check it.

@olton
Copy link
Owner

olton commented Jun 3, 2019

I fix it. Thanks

@olton olton added the Fixed label Jun 3, 2019
@olton olton added this to the v4.3.0 milestone Jun 3, 2019
@olton olton modified the milestones: v4.3.0, v4.2.45 Jun 11, 2019
@olton olton closed this as completed Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants