day8 / re-com

A ClojureScript library of reusable components for Reagent
https://re-com.day8.com.au
MIT License
797 stars 146 forks source link

datepicker-dropdown: The wrapper should set & remove its `disabled` property #216

Closed hipitihop closed 3 years ago

hipitihop commented 4 years ago

Components which the user can interact with (selected, clicked on, typed into, etc.) normally set and reset their disabled attribute and in turn this can be targeted via CSS pseudo class :disabled

The datepicker-dropdown component already supports a :disabled? arg which it passes through to the underlying dropped down datepicker component. This correctly prevents dates from being selected and it also gives the user a visual representation of the disabled state by rendering the dates in the dropped down calendar in a light grey.

However the drop down label/activator shows no difference between when it is and isn't disabled. The label background should be grey, like when normal input fields are disabled.

image

Proposal