How to block out dates in the Fullcalendar beyond a certain date

后端 未结 7 1170
心在旅途
心在旅途 2020-12-08 16:51

I have a date in the future which is always 30 days ahead of the current date. It\'s stored in a Date object. I worked this out using:

var currentDate = new          


        
7条回答
  •  广开言路
    2020-12-08 17:40

    for disable cell on click (version 2.0) :

    dayRender: function( date, cell ) {
         // It's an example, do your own test here
        if(cell.hasClass("fc-other-month")) {
              cell.addClass('disabled');
         } 
    
    },
    dayClick: function(date, jsEvent, view) {
        if($(jsEvent.target).hasClass("disabled")){
            return false;
        }
        // Your code
        // ....
    }
    

提交回复
热议问题