I am using Jquery UI Datepicker like below in Asp.net MVC Application.
Question
-
How to block or remove calender ? (I don’t need it)
-
Still I want other stuff on that Datepicker. Such as date format,default date, etc
Reason
Not Allow user to select a date from calender.But Need to maintain date format.
HTML
<td>
@Html.EditorFor(m => m.CheckIn.DateCheckIn)
</td>
Jquery Code
$('#CheckIn_DateCheckIn').datepicker({ dateFormat: 'm/d/yy', altFormat: 'yy-m-d', onSelect: function () { $(this).parents('form:first').submit(); } });
UI

One way of “disabling” the calendar part is to set showOn to
"button":And then just hide the button with css:
See http://jsfiddle.net/ukHLT/
Or just set the disabled html attributes: