Skip to content

RangePicker dont use the locale correctly #127

@DominikGri

Description

@DominikGri

Bug report 🐞

Version & Environment

  • Version of browser: Chrome Version 89.0.4389.72
  • Version of Conflux-Chain/react-ui: 2.0.0

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}
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions