gpbl / react-day-picker

DayPicker is a customizable date picker component for React. Add date pickers, calendars, and date inputs to your web applications.
https://daypicker.dev
MIT License
5.87k stars 702 forks source link

build: date-fns as regular dependency #2249

Open benasher44 opened 2 days ago

benasher44 commented 2 days ago

Description

See gpbl/react-day-picker#2240

Type of Change

Checklist

Before submitting your pull request, please make sure the following is done:

Linked Issues

gpbl/react-day-picker#2240

gpbl commented 2 days ago

Thanks, but what about the locale prop, the jalali calendar and the utc dates?

While we can add date-fns-jalali and @date-fns/utc to the dependencies, I'm not about the right approach for the locale prop.

I'm considering something like:

- import { es } from "date-fns/locale";
+ import { es } from "react-day-picker/locale";

<DayPicker locale={es} />; // Set the locale to Spanish