@@ -97,7 +97,7 @@ define([
9797 this . _fcNode . fullCalendar ( "render" ) ;
9898 this . _fcNode . fullCalendar ( "refetchEvents" ) ;
9999 this . _timeout = null ;
100- } ) , 100 ) ;
100+ } ) , 50 ) ;
101101 } ,
102102
103103 _setSchedulerOptions : function ( options ) {
@@ -431,6 +431,10 @@ define([
431431 } else {
432432 this . _fcNode . fullCalendar ( "gotoDate" , new Date ( ) ) ;
433433 }
434+
435+ window . _refreshCal = lang . hitch ( this , function ( ) {
436+ this . _fcNode . fullCalendar ( "refetchEvents" ) ;
437+ } ) ;
434438 } ,
435439
436440 _onEventChange : function ( event , dayDelta , revertFunc ) {
@@ -573,8 +577,10 @@ define([
573577 }
574578 } ) ) ;
575579 } else {
576- views . push ( this . defaultView ) ;
577- this . _views [ this . defaultView ] = { } ;
580+ var viewName = this . defaultView ;
581+
582+ views . push ( viewName ) ;
583+ this . _views [ viewName ] = { } ;
578584
579585 if ( this . titleFormat ) {
580586 this . _views [ viewName ] . titleFormat = this . titleFormat ;
@@ -772,7 +778,12 @@ define([
772778 }
773779 } ,
774780
775- _onEventAfterAllRender : function ( ) {
781+ _onEventAfterAllRender : function ( view ) {
782+ if ( view && ( view . type === "agendaWeek" || view . type === "agendaDay" ) ) {
783+ logger . debug ( this . id + "._onEventAfterAllRender" ) ;
784+ view . applyDateScroll ( view . computeInitialDateScroll ( ) ) ; // fixing issue with initial scrolltime (https://github.com/mendix/Calendar/issues/45)
785+ }
786+
776787 // if (!this._triggeredRenderAll) {
777788 // logger.debug(this.id + "._onEventAfterAllRender");
778789 // this._triggeredRenderAll = true;
0 commit comments