aboveyunhai / chakra-dayzed-datepicker

Chakra UI + Dayzed = datepicker
https://aboveyunhai.github.io/chakra-dayzed-datepicker/
MIT License
222 stars 46 forks source link

Unable to change color of disabled dates when hovered #36

Closed jtardioli closed 1 year ago

jtardioli commented 1 year ago

Upon upgrading from version 1.6 to 2.6, I encountered an issue with the background color of disabled dates in my application. The problem only occurs when hovering over the disabled dates. Editing the background color works as intended, except for the hover state. If I'm missing something obvious let me know

Code:

  defaultBtnProps: {
              color: 'paleBlue',
              _hover: { bg: 'octavGreen', _disabled: { bg: 'blue' } },
            }

Example: image

aboveyunhai commented 1 year ago

It seems like there is not style applying while button is disabled, I probably need to think a better way to combine the styling easily, at the same time I want to keep the way of Chakra styling unchanged so I don't introduce any new css styling props for this lib (aka read docs).

Though it's permissible for css to style the _hover _disabled, can you share any scenarios when you want to style the disabled status for _hover?

https://github.com/aboveyunhai/chakra-dayzed-datepicker/blob/20ec63334882594e910d90f92762c3c6662028a2/src/components/dayOfMonth.tsx#L51-L56