开发者

Disable Days in Jquery FullCalendar

I'm using FullCalendar as a large date picker with added featu开发者_JS百科res, and need to disable all Sundays and various other days throughout the year. Jquery UI date picker allows you to create methods for disabling dates. Is there a similar setup for FullCalendar?


Yeah, I needed a hybrid that shows events and allows for date picking with "disabled" Sundays and dates from a string, like the jQuery UI date picker. With some hacking I got what I needed. The only drawback being each time the "back" and "forward" buttons are clicked the entire calender must be re-rendered rather than reusing existing elements like in the standard script.

Its still a work in progress and only implemented for the month view, but here is the gist: http://gist.github.com/361248

Thanks for replying.


b/c fullcalendar is not a datepicker (days cant be "selected"), there really is no notion of 'disabling' a day. if you don't want any events on a given day, simply filter your event data.


Use hiddenDays:[0]
above line hide Sundays from the Calendar. hiddendays take array of integer values. 0 represents Sunday, 1 represents Monday and so on. if you have to hide Saturday and Sunday use
hiddenDays:[0,6]

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜