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.
Proposal
The datepicker-dropdown wrapper should set & remove the <label>disabled attr based on the existing :disabled? boolean. This will automatically render the background in grey when disabled.
Make sure the pseudo-class can be targeted in CSS for those people that need to control the color of the background in cases where they are not using the standard re-com bootstrap theme.
This probably warrants reviewing other re-com components to support this pseudo-class & attr.
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 :disabledThe
datepicker-dropdown
component already supports a:disabled?
arg which it passes through to the underlying dropped downdatepicker
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.
Proposal
datepicker-dropdown
wrapper should set & remove the<label>
disabled
attr based on the existing:disabled?
boolean. This will automatically render the background in grey when disabled.