mantine icon indicating copy to clipboard operation
mantine copied to clipboard

Inconsistent Date Format and Day Suffix for Japanese Locale in DateTimePicker and DatePickerInput

Open matamatanot opened this issue 4 months ago • 4 comments

Dependencies check up

  • [X] I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.13.2

What package has an issue?

@mantine/dates

What framework do you use?

Remix

In which browsers you can reproduce the issue?

Chrome

Describe the bug

Description

There is an inconsistency in the date format between the DateTimePicker and DatePickerInput components when the locale is set to "ja" (Japanese).

In Japan, the standard date format is Year/Month/Day. The DatePickerInput correctly follows this format, but the DateTimePicker incorrectly displays the date in Day/Month/Year format. This should be consistent with the Japanese standard.

Additionally, for the DatePickerInput, the day suffix should be "日" (meaning "day" in Japanese), but it is currently missing.

Steps to reproduce:

Import "dayjs/locale/ja" Use <DateTimePicker label="Pick date" locale="ja" /> and <DatePickerInput label="Pick date" locale="ja" />. Observe the difference in the date format between the two components. Check the missing "日" suffix in DatePickerInput.

Expected behavior:

Both components should follow the Year/Month/Day format for the Japanese locale. The DatePickerInput should display the day suffix "日".

ScreenShot

localhost_5173_dashboard_window_01J9NTZP1E6ZKBEHCDGQX1EPCF

expected: 2024/10/19 or 2024年10月19日

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

No response

Self-service

  • [ ] I would be willing to implement a fix for this issue

matamatanot avatar Oct 08 '24 12:10 matamatanot