I have a Date property with edit validate configured to it to restrict user to select Current date or Future Date only. Earlier It was working fine from yesterday it is not accepting current date and throwing an error when we choose current date. I kindly request to solve my issue and below is the code I’m using in edit validate rule.
Thank you!!
if (theValue.trim().length() == 0) {
return false;
}
java.util.Date theDate = tools.getDateTimeUtils().parseDateTimeString(theValue);
java.util.Date presentDate= new java.util.Date();
theProperty.addMessage("Invalid date ");
return (theDate != null && (theDate.getDate()==presentDate.getDate() || theDate.after(new java.util.Date())));