This is a migrated thread and some comments may be shown as answers.

React DatePicker enable set to false doesnt disable the button

3 Answers 501 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Akhmad Agosto
Top achievements
Rank 1
Akhmad Agosto asked on 20 Dec 2017, 09:15 AM

I'm not sure if this is an oversight or intentional, but setting the React Wrapper DatePicker component's enable config as false does disable the text input but not the datepicker button itself.

Demo here.

Or maybe I'm missing something, and there's a separate config to disable the datepicker button? The jQuery version does disable both of them.

3 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 21 Dec 2017, 06:51 AM
Hi Akhmad,

The described behavior is expected since enable is a method not a property. Once enabled is called as a method with parameter false, both input and button are disabled.

For better understanding please refer to the following sample:



Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Akhmad Agosto
Top achievements
Rank 1
answered on 21 Dec 2017, 09:45 AM

Thank you for the clarification!

I just thought it was a little bit unintuitive for the Datepicker React component to have an enable config while the regular one doesn't at all and has it as a method. Though it is understandable since it is still a jQuery wrapper afterall.

I would assume however the upcoming pure react version will have it as a property right? :)

0
Preslav
Telerik team
answered on 26 Dec 2017, 11:33 AM
Hello Akhmad,

Thank you for writing back.

For the time being, I cannot commit what would be the behavior of the native react components, however, I forwarded your feedback to the responsible developers.


Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Integration with other JS libraries
Asked by
Akhmad Agosto
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Akhmad Agosto
Top achievements
Rank 1
Preslav
Telerik team
Share this question
or