0% found this document useful (0 votes)
39 views1 page

Date Validation

Uploaded by

Ashok
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views1 page

Date Validation

Uploaded by

Ashok
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

function onSubmit() {

//Type appropriate comment here, and begin script below


var field = 'date_range_requested';
var st = g_form.getValue(field);
var newTime = new GwtDate(st);
var tm = new GwtDate();
tm.now();
tm.subtractHours(24);
if (newTime.compare(tm, true) < 0) {
g_form.hideFieldMsg(field, true);
g_form.showFieldMsg(field, 'Start date must be after the today\'s date.',
'error');
return false;
}
}

You might also like