I am attempting to create a template to set date ranges for views that contain tables (and charts later on).
I am having trouble being with having the view default with todays date when the page is loaded.
I have 2 custom properties which are used as parameter values within the named query:
view.custom.selectedStartDate
view.custom.selectedEndDate
I have 6 Buttons which trigger a script to set the date range above:
Today
Yesterday
Next Day
Previous Day
Day Shift
Afternoon Shift
I have 2 Date Time Pickers also:
This all works up to here.
To try and initialize the date I setup a view OnStartUp script but found it will set the date but then when one of the buttons are clicked it creates a loop where the dates start fighting against each other until I leave the view. I tried adding a custom bool called self.custom.intiitalize to only get the script to run once but it does not work.
I also tried binding the custom date params to an expression with todays date but theses also fight against each other.
I have attached an overall layout of inputs in the view for reference. I feel like I am missing something very simple here.