Default Date on a Popup Calender

Is there a way to set up a default date on the pop up calendar. basically, I have a start date and end date for a dataset table. I would like to an option to default this start date to 24 hours back from now() and end date to be now(). Then user must have the option to select the desired date range, which I was able to do it and working well, but not the default date as I mentioned.

Try using a binding on your date range selector’s end to the now(0) function. With the zero, it’ll execute just once on window open. Do the same for the startdate, but with wrapped with a addDays().

I cant do that, as I already have a binding on the date property of the PopUpCalendar for the date validation to check if the date is not beyond now(). Everything works fine, the only problem that I see here is default date that shows on Dec 8th, when I actually did this scripting. So, the problem I anticipate is down the road, when I click the drop down of the popup calendar, it might be showing 2018 dec month rather the current month. If it is after 2 or 3 years, user will have to move the year and date to the current month before they can pick a date. Don’t know was it clear or confused you.
I tried to do scripting on the VisionWindowOpened , but did not work. I might have did some thing wrong.

Enforce your time limit with a propertyChange event. Let the binding I suggest supply the initial value.