Hi,
I'm working with datepickers and I tried the following a while ago:
$("#begin_date").attr('disabled','disabled');
I tried this to disable the text input of a date. But I realized later that it also makes the attribute unavailable for the web server to use in my application. The server wasn't receiving the dates I was picking so I stopped using it.
Is there anyway to disable that text input besides this method?
I'm working with datepickers and I tried the following a while ago:
$("#begin_date").attr('disabled','disabled');
I tried this to disable the text input of a date. But I realized later that it also makes the attribute unavailable for the web server to use in my application. The server wasn't receiving the dates I was picking so I stopped using it.
Is there anyway to disable that text input besides this method?
What if you did the following instead?
$("#begin_date").attr("readonly","readonly");
Regards,
John DeVight
HTML
<input id="f1" width="150px" />
JS
$("#f1").kendoDatePicker().data("kendoDatePicker");
$("#f1").attr("disabled","disabled");
Hope this helps someone. Cheers.
In order to prevent keyboard input for the DatePicker component it is recommended to make it read only. Please check out the article below that describes the approach:
Regards,
Viktor Tachev
Progress Telerik
when you add a read only attribute to the input , any custom validation applied on that field won't be triggered.
Is there a way to forbid any input from the keyboard into the field ?
Hello,
The link provided https://docs.telerik.com/kendo-ui/controls/editors/datepicker/how-to/readonly-input links to an error page.
Hi Chris,
Please find below the correct link to the article:
- https://docs.telerik.com/kendo-ui/knowledge-base/readonly-input
Regards,
Neli