I'm trying to specify a config value for my system users allowing them to modify their working hours in current day and a specific number of previous days on a fullCalendar v4 Calendar. Working hours ranges are clickable events.
Example :
- If config value is 3 that means the users will be able to modify the current day and two previous days.
- Modifying hours require clicking on an event.
Question : How to enable event clicking only on specific days columns ?
var calendar = new FullCalendar.Calendar($('#agenda-calendar')[0], {
columnHeaderFormat: {
weekday: 'short',
day: 'numeric',
omitCommas: true
},
events: {
url: 'url',
dataType: 'json',
},
eventClick: function(info) {
editEvent(info);
},
locale: '<?= Yii::app()->getLanguage() ?>',
selectable: false,
timeFormat: '',
selectHelper: true,
allDaySlot: false,
plugins: ['timeGrid'],
views: {
timeGridMonthDay: {
type: 'timeGrid',
duration: {
weeks: 1
},
buttonText: '<?=$this->_t( '
Month ' )?>'
}
},
defaultView: 'timeGridMonthDay',
minTime: '7:00:00',
maxTime: '22:00:00',
header: {
left: 'prev,next today',
center: 'title',
right: ''
}
});
Calendar Image
