populate a js var minTime and maxTime and use it when setting up the calendar widget to set minTime for end calendar.

This commit is contained in:
Isaac Connor 2020-02-25 13:40:44 -05:00
parent 173d58d8b3
commit 4c2fb6bf08
2 changed files with 4 additions and 4 deletions

View File

@ -1009,8 +1009,7 @@ function initPage() {
$j('#maxTime').datetimepicker({
timeFormat: "HH:mm:ss",
dateFormat: "yy-mm-dd",
//minDate: $j('#minTime').val(),
minDate: -7,
minDate: minTime,
maxDate: +0,
constrainInput: false,
onClose: function(newDate, oldData) {

View File

@ -50,7 +50,6 @@ if ( !$liveMode ) {
$event_id = $event['Id'];
$EventsById[$event_id] = $event;
}
$next_frames = array();
if ( $result = dbQuery($framesSql) ) {
@ -71,7 +70,7 @@ if ( !$liveMode ) {
$event['FramesById'] += array($frame['Id']=>$frame);
$next_frames[$frame['EventId']] = $frame;
}
}
} // end if dbQuery
$events_by_monitor_id = array();
@ -203,6 +202,8 @@ echo "
var numMonitors = $numMonitors;
var minTimeSecs=parseInt($minTimeSecs);
var maxTimeSecs=parseInt($maxTimeSecs);
var minTime='$minTime';
var maxTime='$maxTime';
";
echo "var rangeTimeSecs=" . ( $maxTimeSecs - $minTimeSecs + 1) . ";\n";
if(isset($defaultCurrentTime))