Material-ui: Year range in localized Datepicker is not correct

Created on 11 Jul 2016  路  6Comments  路  Source: mui-org/material-ui

Year Range in Localized Datepicker is not correct . while you set a localized calendar like the persian calendar just you must see year button for localized range of years .

it seems in CalendarYear.js file and getYears method the min and max value for year range not localized .

Steps to reproduce

1.declare const dtf_fa = Intl.DateTimeFormat;

  1. in render method <DatePicker hintText="Portrait Dialog" DateTimeFormat={dtf_fa} locale="fa-IR-u-ca-persian" />
  2. run and see year button value . its shows different number .(in my case show 2016 that equals to localized persian calendar 1395) .

Versions

  • Material-UI: 0.15.2
  • React: 15.2
  • Browser: Chrome 51

dddddd

duplicate

Most helpful comment

hi @mehdijjz
i made a patch for solve this issue . i'll send it as a PR asap .

All 6 comments

I have this problem too ,the day is not correct either ! e.g it says 22 tir while on the calendar 12 tir is active.

@alitaheri Any chance you could comment on this? Thanks.

I haven't used this component for my application nor have I used any other date pickers for this purpose. It would be great if this component could be tweaked to support Persian calendar system. I don鈥檛 really know how to do it though, I never touched this component, sorry folks :sweat_smile: :sweat_smile:

hi @mehdijjz
i made a patch for solve this issue . i'll send it as a PR asap .

@saeedtabrizi Any update on the PR?

I'm closing as I think it's a duplicate of #5101.

Was this page helpful?
0 / 5 - 0 ratings