Jun 2, 2021
Posted by Patrick Burma

I am not that familiar with the inner workings of the calendar widget so it might be possible, but what I think I would probably do is use the data binding and the on change event to check if the data selected is greater than now and if yes set it to the now date/time.

Something like:

var now = new Date(); //Use the correct syntax for ISO date/time format

//Create a page variable called datetime then add the if statement into the on change event

if(page.data.datetime > now){
page.data.datetime = now;
}

© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy