nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Date / Calender components not updating correctly with locale

Open bebbs-dmt opened this issue 1 year ago • 7 comments

NextUI Version

2.4.0

Describe the bug

When updating the locale to use an international calendar, the date and calendar components don't update completely, if at all. This may be related to Next.js, because the CodeSandbox environment for this example seems to work fine, and that uses standard React.

The calendar seems to partially update, this is observable in the stackblitz link below.

Your Example Website or App

https://stackblitz.com/edit/stackblitz-starters-caucmz?file=app%2Fpage.tsx

Steps to Reproduce the Bug or Issue

  1. Open the stackblitz link and wait for the page to compile and load.
  2. Observe that the date picker has not properly updated to use the international calendar.

Expected behavior

Date and calendar components should be updating completely to use the specified locale.

Screenshots or Videos

No response

Operating System Version

Windows 11, developing in WSL Ubuntu 22.04 LTS

Browser

Chrome

bebbs-dmt avatar May 31 '24 01:05 bebbs-dmt

Able to reproduce in next / vite app.

wingkwong avatar May 31 '24 05:05 wingkwong

Can I work on this issue? :)

juank1809 avatar Jun 01 '24 15:06 juank1809

@juank1809 assigned. feel free to contact us in Discord if you need any help.

wingkwong avatar Jun 01 '24 15:06 wingkwong

@juank1809 any updates? if not, I'd like to take over it since I'm working on similar issue.

wingkwong avatar Jun 25 '24 13:06 wingkwong

Hi! I have been trying to resolve this issue for weeks but could not accomplish it. I'm sorry. Feel free to take over :) @wingkwong

juank1809 avatar Jun 25 '24 17:06 juank1809

image

used the Date library i guess this can work

mdharish72 avatar Jun 28 '24 18:06 mdharish72

is this issue already solved?

sohan01fw avatar Aug 05 '24 03:08 sohan01fw

@sohan01fw if it is still open and no linked PR, then no

wingkwong avatar Aug 05 '24 03:08 wingkwong

Having the same issue, I18nProvider doesn't change anything for me.

yarikpetrenko avatar Sep 13 '24 17:09 yarikpetrenko

@bebbs-dmt and for those who are having this issue, please check the version of @react-aria/i18n that you are using. NextUI is using a fixed version 3.11.1. If you are using other version, it may cause this issue. From the OP example, you may simply change as follows in your package.json.

-"@react-aria/i18n": "^3.11.1",
+"@react-aria/i18n": "3.11.1",

Here's the result. You may need to remove node_modules before reinstalling. I'll update the docs accordingly.

image

wingkwong avatar Oct 30 '24 02:10 wingkwong