Support Article
Unable to select a date from a Calendar Control
SA-43147
Summary
Unable to select a date from a Calendar Control, after adding a Date control, in a repeating grid, with multiple action sets (such as DT, Section refresh with DT and Activity (compare end date to start date)). The issue occurs on selecting and unselecting the date and repeating the action multiple times.
Error Messages
Not Applicable
Steps to Reproduce
- Create a Date control in a repeating grid with Action Set (End date must be after the Start date. The Start date can be before or after the Current date).
- Select the End date to be before the Start date. Now, select the End date after the Start date.
- Repeat Step 2 multiple times.
Root Cause
Multiple action sets were configured on the Calendar control.
Resolution
Perform either of the following steps to resolve the issue:
- Use the activity to validate dates in separate action sets not under refresh.
Or
- Create a new editValidate rule using the below code:
if (theValue.trim().length() == 0) {
return false;
}
ClipboardPage pgParent = theProperty.getTopLevelPage(); // get your top level page here where your property reside that is compared
java.util.Date startDate = tools.getDateTimeUtils().parseDateTimeString(pgParent.getString("startDate")) ;
java.util.Date endDate = tools.getDateTimeUtils().parseDateTimeString(theValue);
boolean comparison = endDate.before(startDate);
theProperty.addMessage("endDate is before date: " + startDate);
return false;
Published December 9, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.