Is there anyway to make a jQuery UI Datepicker unclickable?
Is there anyway to make a jQuery UI Datepicker unclickable, so that it's essentially just displaying a date? I tried
$("#calendar").datepicker({
dis开发者_高级运维abled: true,
altField: '#note_date',
maxDate: 0
});
but it didn't work. Thanks for reading.
Something like this?
Example: http://jsfiddle.net/Ay6Nv/
$('#calendar').datepicker({
beforeShowDay: function(date) {
return [new Date(this.value).getDate() == date.getDate()];
}
});
Why don't you add the readonly attribute at the input like this :
<input type='text' value='24/01/2019' readonly="readonly" />
精彩评论