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

Hide times that don't validate #45

Closed Commander-lol closed 7 years ago

Commander-lol commented 8 years ago

Adds the hideOutsideDateTimes prop, to hide times (and only times - doesn't make sense with dates) that do not pass validation

I've got a use case for not displaying times that don't validate in the time selector (Basically a limit on the times that are displayed, just displaying them as invalid/unselectable isn't quite enough) & couldn't find a prop for it in the docs.

If this is already a feature, I can maybe change this PR to a docs update that makes it easier to find.

Also input on the prop naming is likely needed, others seemed to refer to invalid times as "outside range" instead of invalid, so I went with that

Current: selection_114

With hideOutsideDateTimes: selection_115