What is the best way to hide ONLY events on a calendar? I was considering deleting all events when the user clicks the "month" button. How can I achieve this functionality?
$scope.uiConfig = {
calendar: {
height: 450,
editable: false,
selectable: true,
header: {
left: 'title',
center: '',
right: 'month today prev,next'
},
eventClick: $scope.alertOnEventClick,
eventDrop: $scope.alertOnDrop,
eventResize: $scope.alertOnResize,
eventRender: $scope.eventRender,
dayClick: $scope.alertOnDateClick,
timeClick: $scope.alertTest
}
};
I believe the function for the month button can be found in fullcalendar.js
var MonthView = BasicView.extend({
// Code for determining what range to display goes here
computeRange: function(date) {
// Logic here to ensure 6 weeks are displayed
},
// Custom logic for auto-height adjustment based on weeks
setGridHeight: function(height, isAuto) {
// Auto-height adjustment logic goes here
},
isFixedWeeks: function() {
// Logic to determine if fixed weeks should be shown
}});`
I currently have an implementation where events are generated upon clicking a date, but I want to remove all events when returning to the month view by clicking the month button.
$scope.alertOnDateClick = function(date, jsEvent, view, start, end, allDay){
//Logic for handling date clicking and event generation goes here
};