File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,12 @@ function loadWeek(lastDay, index) {
1818 if ( lastDay . dataset . last === "false" ) {
1919 return false ;
2020 }
21+ lastDay . dataset . last = false ;
2122 const path = '/calendar/month/' + lastDay . id ;
22- const newDays = document . createElement ( 'html' ) ;
2323 fetch ( path ) . then ( function ( response ) {
24- lastDay . dataset . last = false ;
2524 return response . text ( ) ;
2625 } ) . then ( function ( html ) {
27- const newDiv = document . createElement ( "div" ) ;
28- newDays . innerHTML = html ;
29- newDiv . appendChild ( newDays ) ;
30- document . getElementById ( "calender-grid" ) . append ( newDays ) ;
26+ document . getElementById ( "calender-grid" ) . insertAdjacentHTML ( 'beforeEnd' , html ) ;
3127 setToggle ( "day" , "day-view" , "day-view-visible" , index ) ;
3228 } ) ;
3329}
You can’t perform that action at this time.
0 commit comments