OMikkel / tailwind-datepicker-react

A tailwindcss/flowbite datepicker component built as a react component with types
https://omikkel.github.io/tailwind-datepicker-react/
MIT License
160 stars 68 forks source link

fix: max and min options, clone the date options to not cause issues of manipulating the wrong reference #59

Open kibolho opened 3 months ago

kibolho commented 3 months ago

We can't manipulate date references without clone it, otherwise it will change the original value: image So this was causing some issues with the max and min limits in the goToPrevNext function. So this PR fix this issue by cloning the date object: const newDate = new Date(date.getTime()); And also fixing some layout issues to represent the disabled date values