react-day-picker
react-day-picker copied to clipboard
Add an example using tailwind
Some developers are wondering how to use tailwindcss with DayPicker.
@malcolm-kee proposed a solution here:
Repo: https://github.com/malcolm-kee/react-day-picker-tailwind Demo: https://react-day-picker-tailwind.netlify.app/
but we could add it to the documentation.
Thanks examples @gpbl
@shadcn's UI components library also uses react-day-picker
:
https://ui.shadcn.com/docs/components/calendar
I would also love to get the caption_layout version because the above examples only show the nav buttons but do not select month and year. For whatever reason, I've been struggling with disabling the aria-hidden="true" divs within the calendar forked from shadcn.
Actually nevermind. Again it was a tailwind issue on creating caption labels.
Closing this as DayPicker 9 is in beta and comes up with a simplified HTML tree and UI elements: the changes will allow an easier and solid customization via TailwindCSS.
See the example here: https://react-day-picker.js.org/next/using-daypicker/styling#tailwind-css
Try the beta and let me know if it works for you - and if not! Thanks.