johnpolacek / date-range-picker-for-shadcn

DateRangePicker is a reusable component for shadcn using Radix UI and Tailwind CSS. Includes preset date ranges, text entry, calendar selection and date comparison
https://date-range-picker-for-shadcn-demo.vercel.app/
MIT License
643 stars 24 forks source link

How can I localize the whole calendar? #16

Open fernandocanizo opened 3 months ago

fernandocanizo commented 3 months ago

Hello, how can I localize the whole calendar, because current code only localizes the button, but once you open the picker you get:

All localized to "en"

image

And I need the calendar to be fully localized because as it's shown currently, it produces confusion.

gustipardo commented 1 month ago

You can localized the calendar with date-fns into the component Calendar My code: import { es } from "date-fns/locale" <Calendar weekStartsOn={1} locale={es} mode="range" ...

Screenshot from 2024-08-15 09-48-18