React-datepicker: Disable inline datepicker does not work

Created on 22 Aug 2016  路  7Comments  路  Source: Hacker0x01/react-datepicker

The disabled attribute does not seem to work for inline DatePickers. Works fine without the inline.

Is this by design or a bug? It would be nice to be able to disable inline as well.

// does not work
disabled={true}
inline
...
/>

// works
disabled={true}
...
/>

wontfix

All 7 comments

What do you mean by "does not seem to work"? You can specify inline and disabled: http://codepen.io/jochenberger/pen/YpvxgV

I have no idea why, but It seems to not work for me either. Maybe the issue can be that I have the inline date picker in bootstrap modal somehow?

If you take the same example and modify it to include selected and onChange, it behaves as if nothing is actually disabled.

http://codepen.io/anon/pen/aJQryY

The developer can get around some of this by setting minDate and maxDate to the selected value and omitting the onChange handler, but the calendar should at least have some visual indicators that it is disabled.

I created an example based on @jochenberger's example that effectively created the appearance of a disabled inline date:

http://codepen.io/anon/pen/XMywPE

It has been a while my friends! Unfortunately the issue still persists.
Workaround of setting the minDate and maxDate works, however it would be nice if this could get fixed soon.

+1

+1

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kkras3 picture kkras3  路  3Comments

ali-master picture ali-master  路  3Comments

sarav1234 picture sarav1234  路  3Comments

arturictus picture arturictus  路  3Comments

rsouthpaw picture rsouthpaw  路  3Comments