diff --git a/client/js/masterFilter.js b/client/js/masterFilter.js index 1f9bfbe..2a36f4a 100644 --- a/client/js/masterFilter.js +++ b/client/js/masterFilter.js @@ -126,8 +126,9 @@ let createMasterFilterFrame=()=>{ } me.timeChanged=(newTime)=>{ - if (_filterContext.selectedTime!==newTime){ + if ((_filterContext.selectedTime!==newTime) || (_filterContext.theDateOfTime!==_filterContext.theDate)) { _filterContext.selectedTime=newTime; + _filterContext.theDateOfTime=_filterContext.theDate; $("#tbSelectedTime").text(newTime); console.log("Time changed", newTime); } @@ -158,22 +159,26 @@ let createMasterFilterFrame=()=>{ let lbTime=$("#lbTime"); lbTime.empty(); allTimes = availableTimes; + let presetTime=undefined; for (let i=0;i= theTime.substring(0,4)){ + presetTime = theTime; } } else { - if (i==4) { + if (i==4) { // this is usually upon open - initializing the selected time... // select the 4th time in the day... that's usually around 9:30 - me.timeChanged(theTime); + presetTime = theTime; } } //lbTime.append($(``)) lbTime.append($(``)) - } + me.timeChanged(presetTime); $("#lbTime").change(); $("#spinner-time").hide(); });