React-date-picker: Option to disable date picker control

Created on 22 Jan 2018  路  10Comments  路  Source: wojtekmaj/react-date-picker

Can you please add the option to disable the control by exposing a prop
something like disabled = {true}
so that is becomes easy to handle the control based on the use cases

Currently i implemented a solution by setting pointer-events: none; but user can still tab through it and change using the keyboards

enhancement

Most helpful comment

@wojtekmaj This was a dumb mistake. I wrote a wrapper component for the date-picker, and forgot to pass the disabled prop properly, so it wasn't disabling. My mistake

All 10 comments

Oh wow, I'm amazed you are the first person to point that out. I'll do this soon!

+1

All,
the feature has been implemented in v6.9.0

@wojtekmaj is it working in IE-11? For me, its greyed out but when i click on it, I am able to change it.

Hi @rohitketkar87, thanks for pointing that out - I can confirm there is an issue on IE caused by its non-standard behavior, being focus action being triggered on disabled elements. Fix is on the way.

@rohitketkar87, v6.10.1 is out. Let me know if it works for you.

@wojtekmaj Working now. Thanks.

I am still able to change the date in Chrome if disabled={true}

@shivavelingker Which version are you on? I retested the whole suite and can't reproduce.

@wojtekmaj This was a dumb mistake. I wrote a wrapper component for the date-picker, and forgot to pass the disabled prop properly, so it wasn't disabling. My mistake

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RubberChickenParadise picture RubberChickenParadise  路  6Comments

allys00 picture allys00  路  4Comments

leo-iomer picture leo-iomer  路  8Comments

cavishek39 picture cavishek39  路  3Comments

wojtekmaj picture wojtekmaj  路  7Comments