Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Date range validations on Date Field

Krisgum
Level 4
Level 4

Hi  ,

  I'm trying to resolve a use case , where i need to apply date range validations and also provide options for date offsets ex : currentDate+20 ..

The current OOTB date picker component do not provide such configurations , though native html 5 date has min and max date range attributes to support . 

  I'm currently considering an approach to extend current dateTime xfa widget  and in render method hook jqueryUI date picker . But with this approach iIm not sure how to actually show error message to end user on validation  . Are there any standard methods like render that can be overidden in the widget to show custom error messages ? 

If not any other easy approached to handle this use case ? 

1 Accepted Solution
gauravahuja11
Correct answer by
Level 2
Level 2

Hi,

For adding maximum and minimum support for a component, you can add a validation script on that component using the rule editor.

I've attached a screenshot for the script on a text field for a maximum value - 20 and minimum value - 10

The documentation for rule editor is available at - https://helpx.adobe.com/aem-forms/6-1/rule-editor.html

View solution in original post

1 Reply
gauravahuja11
Correct answer by
Level 2
Level 2

Hi,

For adding maximum and minimum support for a component, you can add a validation script on that component using the rule editor.

I've attached a screenshot for the script on a text field for a maximum value - 20 and minimum value - 10

The documentation for rule editor is available at - https://helpx.adobe.com/aem-forms/6-1/rule-editor.html

View solution in original post