Details
-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 4.0
-
Fix Version/s: None
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces 4 trunk, Tomcat
-
Workaround Exists:Yes
-
Workaround Description:A second level of validation can be done at the bean level, to check the proper min/max date manually.
Description
If I have a component like:
<ace:dateTimeEntry value="#{bean.ourDate}"
renderAsPopup="true"
required="true" requiredIndicator="*"
mindate="#{controller.minDate}" maxdate="#{controller.maxDate}"
showOn="both"
pattern="MM/dd/yyyy h:mm a"/>
Where minDate is:
Calendar cal = Calendar.getInstance();
cal.add(Calendar.MINUTE, 30);
minDate = cal.getTime();
This should disallow a date entry with a time earlier than 30 minutes from now. But the time sliders seem unaffected by the mindate attribute, so I could enter midnight or 1am when visiting the app at 3pm (which should allow a minimum of 3:30pm only).
<ace:dateTimeEntry value="#{bean.ourDate}"
renderAsPopup="true"
required="true" requiredIndicator="*"
mindate="#{controller.minDate}" maxdate="#{controller.maxDate}"
showOn="both"
pattern="MM/dd/yyyy h:mm a"/>
Where minDate is:
Calendar cal = Calendar.getInstance();
cal.add(Calendar.MINUTE, 30);
minDate = cal.getTime();
This should disallow a date entry with a time earlier than 30 minutes from now. But the time sliders seem unaffected by the mindate attribute, so I could enter midnight or 1am when visiting the app at 3pm (which should allow a minimum of 3:30pm only).
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion