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

DatePicker localized in French encounters some issues between 1944 and 1981 #7767

Closed
skulliah opened this issue Aug 15, 2017 · 4 comments
Closed
Labels
component: date picker This is the name of the generic UI component, not the React module!

Comments

@skulliah
Copy link

Hello,

I'm having a pretty annoying problem with the localized DatePicker in French. Between the years 1944 and 1981 included, there are twice the month of March and there is no month of February.

So for example when trying to choose August 15, 1970 we get September 15, 1970. The problem is not present on the default version in English and I just used the same code as the one provided on the French localized example on the website :

import DatePicker from 'material-ui/DatePicker';
import areIntlLocalesSupported from 'intl-locales-supported';

let DateTimeFormat;

if (areIntlLocalesSupported(['fr', 'fa-IR'])) {
  DateTimeFormat = global.Intl.DateTimeFormat;
} else {
  const IntlPolyfill = require('intl');
  DateTimeFormat = IntlPolyfill.DateTimeFormat;
  require('intl/locale-data/jsonp/fr');
  require('intl/locale-data/jsonp/fa-IR');
}

<DatePicker
      hintText="fr locale"
      DateTimeFormat={DateTimeFormat}
      okLabel="OK"
      cancelLabel="Annuler"
      locale="fr"
/>

I'm using firefox v55.0.1 [email protected] and [email protected] but the example on the website encounters the same problem.

@oliviertassinari oliviertassinari added the component: date picker This is the name of the generic UI component, not the React module! label Aug 15, 2017
@oliviertassinari
Copy link
Member

Closing for #4787

@Trudko
Copy link

Trudko commented Jan 26, 2018

Does this means that this won't be fixed until Datepicker port is ready?
Is there some workaround? Thank you.

@mbrookes
Copy link
Member

@Trudko It will only be fixed if someone that uses it chooses to fix it.

@Trudko
Copy link

Trudko commented Jan 26, 2018

@mbrookes thank you for quick answer! I might take a look at it. Just so I understand it seems that problem is only with localized datepickers. Also form our experience we weren't able to reproduce this on Linux(Ubuntu 16.04) and latest OSx. This has occurred only on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: date picker This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

4 participants