File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 11581158 {
11591159 opt . start = time ;
11601160 opt . end = false ;
1161- if ( opt . time . enabled ) {
1162- changeTime ( "start" , opt . start ) ;
1163- }
11641161 }
11651162 else if ( opt . batchMode === 'week' )
11661163 {
11911188 {
11921189 opt . start = handleStart ( time ) ;
11931190 opt . end = false ;
1194- if ( opt . time . enabled ) {
1195- changeTime ( "start" , opt . start ) ;
1196- }
11971191 }
11981192 else if ( opt . start )
11991193 {
12031197 }
12041198 }
12051199
1200+ //Update time in case it is enabled and timestamps are available
1201+ if ( opt . time . enabled ) {
1202+ if ( opt . start ) {
1203+ changeTime ( "start" , opt . start ) ;
1204+ }
1205+ if ( opt . end ) {
1206+ changeTime ( "end" , opt . end ) ;
1207+ }
1208+ }
1209+
1210+ //In case the start is after the end, swap the timestamps
12061211 if ( ! opt . singleDate && opt . start && opt . end && opt . start > opt . end )
12071212 {
12081213 var tmp = opt . end ;
You can’t perform that action at this time.
0 commit comments