themesberg / flowbite-datepicker

A Tailwind CSS datepicker built with vanilla JavaScript
https://flowbite.com/docs/components/datepicker/
MIT License
139 stars 43 forks source link

When using `todayHighlight` today isn't highlighted when going from selecting today to some other date #29

Open samal-rasmussen opened 11 months ago

samal-rasmussen commented 11 months ago

When using todayHighlight today is not highlighted when you start with today selected and then select some other date. The selected item gets the highlighted class removed, and it doesn't get added back when unselecting.

Today will get highlighted when you switch month back and forth, as this fully redraws the ui.

Issue is caused by the removal of bg-gray-100 from the selected item here: https://github.com/themesberg/flowbite-datepicker/blob/98eccf3611605ca4ff6b2cf8a65f72d89ab6052b/js/picker/views/DaysView.js#L193C160-L193C160