felixakiragreen / react-kronos

A fast, intuitive, and elegant date and time picker for React.
https://felixakiragreen.github.io/react-kronos/
MIT License
89 stars 28 forks source link

disable component #50

Closed amelon closed 7 years ago

amelon commented 7 years ago

hello,

can't find any option to disable component.

Could be fine to have a disabled prop as we do for an input element (<input disabled/>).

...
render() {
   return <Kronos disabled />
}
...

Or do you have other suggestion?

marktkimball commented 7 years ago

Would like this option as well.

felixakiragreen commented 7 years ago

What would you like the behavior to be when it is disabled? Hidden? Visible but not interactive (greyed out)?

marktkimball commented 7 years ago

@dubert I think greyed out with the cursor: not-allowed; css when hovering the element would make sense.

yrokhlin commented 7 years ago

Greyed out like typical disabled input behavior, need this as well.

schuchowsky commented 7 years ago

Hey guys, while we don't have this feature, I solved it with this workaround: https://stackoverflow.com/questions/28083708/how-to-disable-clicking-inside-div

Just use the css pointer-events:none; in a parent element.

felixakiragreen commented 7 years ago

Just released 1.6.0!

Try out the disabled prop.