Chaitanya ILCR
Giga Patron

HI @may13 ,

 

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }

    var selectedDate = new Date(getDateFromFormat(newValue, g_user_date_format));

    var currentDate = new Date();
    currentDate.setMonth(currentDate.getMonth() - 1);
    currentDate.setDate(currentDate.getDate() - 1);
    if (selectedDate.valueOf() >= currentDate.valueOf()) {
        alert('please select on month old date');
		//write your additional code here to clear the value or whatever d action dat you want to take
    }

}

create a onChange catalog client script on the record producer on the incident date variable with above script

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya