开发者

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" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜