Problem is, how to disable selectable on PAST DATES in fullcalendar's month/week view.
I want to user not allowed to click/select the on past dates.
Here is some googled code snippet I am trying to implement on event rendering:
selectable: true,
selectHelper: false,
select: function(start, end, allDay) {
var appdate = jQuery.datepicker.formatDate('<?php echo $DPFormat; ?>', new Date(start));
jQuery('#appdate').val(appdate);
jQuery('#AppFirstModal').show();
},
eventRender: function(event, element, view)
{
var view = 'month' ;
if(event.start.getMonth() !== view.start.getMonth()) { return false; }
},
But its not working though.
I tried bellow CSS too and this help me to hide past date text only, but selectable is still working on pastdate box.
.fc-other-month .fc-day-number {
display:none;
}
I am really stuck with this problem. Please someone help me out.
Thanks...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…