I want to hide cells of previous and next month dates, which are coming in current month view. I tried adding css but not working for me:
<style>
.hiddenEvent{display: none;}
.fc-other-month .fc-day-number { display:none;}
td.fc-other-month .fc-day-number {
visibility: hidden;
}
</style>
I want to hide cells, so that user cannot create events by clicking on next month's days. Thank you.
From version 3.3.0 you can now use showNonCurrentDates: false .
$('#calendar_1').fullCalendar({
header: {
left: '',
center: 'title',
right: ''
},
defaultView: 'month',
editable: true,
allDaySlot: true,
selectable: true,
selectHelper: true,
selectOverlap: false,
fixedWeekCount: false,
showNonCurrentDates: false,
select: function (start, end) {
var title = "Available";
var evid = SaveEvent(start, end, '1');
$('#calendar_1').fullCalendar('unselect');
},
eventClick: function (calEvent, jsEvent, view) {
var ev_id = calEvent.ID;
var st_dt = calEvent.start;
var ed_dt = calEvent.end;
infoEventShow('1', ev_id, st_dt, ed_dt);
},
slotMinutes: 15,
events: '/Aircrew/GetEvents/',
eventColor: '#339900'
});
Reference https://fullcalendar.io/docs/display/showNonCurrentDates/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With