Reputation: 10575
I have this $("#xt1").datepicker({ dateFormat: 'dd-M-yy' });
statement for the datepicker in Jquery with this statement user can enter some value
for the date in the text field where as with this statement $("#xt1").datepicker();
user cannot enter any value in to the Text field .
How can we format the date and as well as not allow the user to enter the date
Upvotes: 1
Views: 130
Reputation: 10371
@Derby: Add the readonly="readonly"
attribute to the #xt1
input
, e.g.:
<input type="text" name="xt1" id="xt1" readonly="readonly" />
Upvotes: 1