开发者

Disable specific day in Jquery date picker

I want to disable all days with out Monda开发者_StackOverflowy and Friday in Jquery date picker. How to do it?


What threw you off might be the hidden $.datepicker.noWeekends method, which is really what you're after. So, what you really need to do is:

$("#datepicker").datepicker({
    beforeShowDay: function (date) {
        var day = date.getDay();
        return [(day == 1 || day == 5), ''];
    }
});

See example: http://jsfiddle.net/william/fsEpP/2/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜