Fix js bug.

This commit is contained in:
BoHung Chiu 2022-07-13 12:07:10 +08:00
parent 8892dbb9f8
commit 53eced22cc
1 changed files with 5 additions and 1 deletions

View File

@ -215,14 +215,17 @@ var Calendar = function(dom,property_id,currentView,display_hire_event){
c.nextBtn.click(function(){
c.dialog.dismiss();
c.calendar_dom.calendar.next();
c.title.text(c.calendar_dom.calendar.currentData.viewTitle);
});
c.prevBtn.click(function(){
c.dialog.dismiss();
c.calendar_dom.calendar.prev();
c.title.text(c.calendar_dom.calendar.currentData.viewTitle);
});
c.todayBtn.click(function(){
c.dialog.dismiss();
c.calendar_dom.calendar.today();
c.title.text(c.calendar_dom.calendar.currentData.viewTitle);
});
c.modeBtns.click(function(){
c.dialog.dismiss();
@ -267,7 +270,8 @@ var Calendar = function(dom,property_id,currentView,display_hire_event){
viewTitle = $('.fc-col-header-cell-cushion ').text() + ', ' + viewTitle;
$('#current_title').html(viewTitle);
}
c.calendar_dom.calendar.render(); //Rerender to fix layout
c.title.text(c.calendar_dom.calendar.currentData.viewTitle);
// c.calendar_dom.calendar.rerenderEvents(); //Rerender to fix layout
};
if(c.currentView == "agenda"){toggleViews("agenda");loadeventsonviewchange = true;}
};