I want to give a validation that date before today cannot be selected . how to do it???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 10:04 PM
In date or date time field user will not be able to select the date before today .. how to do that????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 10:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 10:12 PM
Hi Suprakash
You can check this link of similar requirement which i have answered
Regards
Thameem

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 10:13 PM
Write a before BR on the table
(function executeRule(current, previous /*null when async*/) {
if(current.u_date < gs.nowDateTime()) // u_date is the field name
{
gs.addInfoMessage('Invalid date.today and Past dates cannot be selected');
current.setAbortAction(true);
}
})(current, previous);
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 10:14 PM
Hi Suprakash,
Please find the below threads. These may help you:
How to write a date validation script in server side?
I hope this helps.Please mark correct/helpful based on impact