Method for redrawing the calendar after modifying options? #278
Replies: 1 comment
-
Doh! For anyone who's as stupid as me, just use the setOption method... if (info.view.type == "dayGridMonth") { |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bit of a newbie so this might be a very stupid question, but how do you 'redraw' the calendar once you've updated some options?
Specifically, for my setup, when the user clicks on any empty date in the dayGridMonth view, I'd like it to display the timeGridWeek view for that date.
So I've added a dateClick callback function which then checks the current view...
function addEvent(info) {
// Clicked on a date in the month view
if (info.view.type == "dayGridMonth") {
ec.date(info.date);
ec.view('timeGridWeek');
// HOW TO REFRESH THE VIEW???
} else {
alert("Add Event");
}
}
Am I going about this the wrong way?
Beta Was this translation helpful? Give feedback.
All reactions