KendoUI DatePicker input not editable


Might seem counterintuitive but many webs prompting for dates, disable the edit field in order to prevent the user from introducing an incorrect date, forcing you to use a calendar widget.
It is pretty simple getting the same effect while using KendoUI DatePicker widget.

Non editable KendoUI DatePicker input

Add readonly=”readonly” to the input field definition.

<input id="cal" readonly="readonly"/>

and invoke KendoUI DatePicker widget initialization as:

$("#cal").kendoDatePicker({});

Et voilà!

Advertisements

One thought on “KendoUI DatePicker input not editable

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s