saas-js / saas-ui

The React component library for startups, built with Chakra UI.
https://saas-ui.dev
MIT License
1.36k stars 131 forks source link

DateInput locale prop issue #249

Open Bliqui opened 3 months ago

Bliqui commented 3 months ago

Description

With the locale prop, only the input itself is localized. Calendar popup remains in English

image image

Link to Reproduction

Link

Steps to reproduce

Just render DateInput with locale prop set to any language (besides english :) )

Saas UI Version

2.8.8

Chakra UI Version

2.8.2

Browser

No response

Operating System

Additional Information

No response

linear[bot] commented 3 months ago

SUI-512 DateInput locale prop issue

Pagebakers commented 2 months ago

To enable translations you can wrap your app with I18nProvider

import { I18nProvider } from '@react-aria/i18n'

<I18nProvider locale="nl-NL">

I might consider adding this as a wrapper around all date picker components, but it does add extra weight to the package.

Bliqui commented 2 months ago

@Pagebakers it just a little confusing for me that passing the locale prop only translates the input itself