Material-ui-pickers: Time Digits in date time/time picker wont be loaded for the peer library localization

Created on 13 Mar 2019  路  4Comments  路  Source: mui-org/material-ui-pickers

Environment

| Tech | Version |
|---------------------|---------|
| material-ui-pickers | 2.2.4 |
| material-ui | 3.9.2 |
| React | 16.8.4 |
| Browser | Chrome 72.0.3626.121 |
| Peer library | moment, 2.24.0 |

Steps to reproduce

1.Use date time picker with "ar" localization on moment
2.Note the time picker captions are still in "en" while the selected time is shown in the correct caption

Expected behavior

Time picker digits should be as the time result

Actual behavior

Digits are different

Live example

https://codesandbox.io/s/00kwz8v540?fontsize=14

bug 馃悰

All 4 comments

Thats a bug :) Maybe

Just wondering - you are not using @date-io/jalaali just moment. I am wondering that it will be not so easy as I supposed

Checkout this example https://material-ui-pickers.dev/localization/persian#example
And https://material-ui-pickers.dev/guides/formats#utils-interface

You can override formatNumber method to make it works for you

Thank you so muck it worked 馃挴 .

For anyone wondering how , here is an example :
https://codesandbox.io/s/00kwz8v540?fontsize=14

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benneq picture benneq  路  3Comments

nicky-dev picture nicky-dev  路  3Comments

katy6514 picture katy6514  路  3Comments

charlax picture charlax  路  3Comments

danmce picture danmce  路  3Comments