onesine / react-tailwindcss-datepicker

Modern date range picker component for React using Tailwind 3 and dayjs. Alternative to Litepie Datepicker.
https://react-tailwindcss-datepicker.vercel.app/
MIT License
552 stars 169 forks source link

#163 fixes calculation of previous date in other languages #209

Closed IsaEs closed 3 months ago

IsaEs commented 1 year ago

Solution for previous days calculation.

Problem: when i18n enabled if there is multiple instance of calendar previous date calculation wrong.

Solution: dayString gets ddd when it comes with i18n support it doens't matched with array. So I passed basic and used 'en-Us' form of the dayString.

onesine commented 3 months ago

Hi @IsaEs 👋. Sorry for the late reply. But I think this problem is already solved. Thanks for the contribution.