Conflux-Chain / react-ui

Modern and minimalist React UI library.
https://conflux-react-ui.vercel.app
MIT License
5 stars 4 forks source link

RangePicker dont use the locale correctly #127

Open DominikGri opened 3 years ago

DominikGri commented 3 years ago

Bug report 🐞

Version & Environment

Expection

The RangePicker should be displayed in german. Days and Months should be translated correctly

Actual results (or Errors)

The RangePicker is still in english. Even if the locale of dayJs locale is 'de' (output of dayjs.locale()).

import locale from '@jnoodle/rc-picker/lib/locale/de_DE'
import 'dayjs/locale/de'

dayjs.locale('de')

<RangePicker
  format="DD. MMMM YYYY"
  locale={locale}
  ranges={{
    Today: [dayjs(), dayjs()],
    'This Month': [dayjs().startOf('month'), dayjs().endOf('month')],
  }}
  onChange={onChange}
/>
DominikGri commented 3 years ago

I could offer you to add a new locale, as a pull request. If this is possible ?

angelia-yuqi-personal commented 3 years ago

I could offer you to add a new locale, as a pull request. If this is possible ?

Of course it's very nice if you could fix the issue as a pull request. Thank you very much.