Fixed problem with not selecting last date in a sequence.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 28 Mar 2016 17:13:38 +0000 (13:13 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 28 Mar 2016 17:13:38 +0000 (13:13 -0400)
classes/data/dataRecurrences.php
views/admin/events/edit.html

index 718d468..49ceb02 100644 (file)
@@ -371,8 +371,8 @@ class GlmDataEventsRecurrences extends GlmDataAbstract
         }
 
         // Overall range to scan for event times
-        $from = new DateTime($recurData['from_date']['date']);
-        $to = new DateTime($recurData['to_date']['date']);
+        $from = new DateTime($recurData['from_date']['date'].' 00:00');
+        $to = new DateTime($recurData['to_date']['date'].' 00:00');
 
         // Calculate interval for single event - If start time only, then start and end are the same
         $start = new DateTime($recurData['start_time']['datetime']);
@@ -449,8 +449,9 @@ class GlmDataEventsRecurrences extends GlmDataAbstract
             $dates[$start->getTimestamp()] = $start;
         }
 
-        // Create From and to timestamp for comparison
+        // Create From and to timestamp for comparison - Make to date +1 day
         $fromTime = $from->getTimestamp();
+        $to->modify('+1 day');
         $toTime = $to->getTimestamp();
 
         // Check for $replace, if so delete all existing entries and custom events
index f765bee..fe12489 100644 (file)
             {/foreach}
                         ],
                         defaultDate : '{$firstTime.start_time.datetime}',
-                        timeFormat  : 'h:mma'
+                        timeFormat  : 'h:mma',
+                        fixedWeekCount : false
         {/if}
                     });