react-tailwindcss-datepicker
react-tailwindcss-datepicker copied to clipboard
fix: weekday check function for other locales
Fixing issue #150 , #221
Problem:
- Calendar doesn't show previous month, all months start with 1.
Reason:
- This is due to
getNumberOfDaybeing stuck at number = 0, when delcaring dayjs.locale() other than "en" globally outside library.
The Fix:
- Instead of using hard-coded weekday string array ["Sunday", ... "Saturday"], a function is created to specifically use previously set locales.
Merge please! 🥲
Hello @cheeselemon 👋. Sorry for the late reply. Thanks for the contribution.