jQuery UI Widgets › Forums › Editors › DateTimeInput › Restrict DatePicker Navigation
Tagged: jquery datetimeinput, jqxdatetimeinput, readonly input, restrict navigation dates
This topic contains 1 reply, has 2 voices, and was last updated by George Todorov 8 years, 3 months ago.
I have 2 questions about the DateTimeInput.
1. How to restrict the possible navigation dates?
2. Can I make the input field readonly? I want input only from the calendar.
Thanks in advance
Thank you for writing.
Regarding your questions:
1. To restrict the range of allowed dates, you can use the “setMinDate” and “setMaxDate” functions.
$("#jqxDateTimeInput").jqxDateTimeInput('setMinDate', new Date(2010, 0, 1));$("#jqxDateTimeInput").jqxDateTimeInput('setMaxDate', new Date(2013, 0, 1));
2. You can achieve this by setting the ‘readonly’ property to true. The code example below shows how to set it:
You must be logged in to reply to this topic.