Planned start date must be after current date

NikhithaNikki
Tera Contributor

I have created a field in Record producer which is planned start time. I have requirement that the planned start date must be after the current date.

6 REPLIES 6

@NikhithaNikki 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Muhammad Salar
Giga Sage

Try this on onChange,

var selectedDate = new Date(newValue);
    var now = new Date();

    if (selectedDate <= now) {
        alert('Date/time must be in the future.');
        g_form.setValue('date''');
    }