Date range validations on Date Field

Avatar

Avatar
Validate 10
Level 2
Krisgum
Level 2

Likes

12 likes

Total Posts

67 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
Krisgum
Level 2

Likes

12 likes

Total Posts

67 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Krisgum
Level 2

26-05-2016

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 ? 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 1
Level 2
gauravahuja11
Level 2

Like

1 like

Total Posts

9 posts

Correct reply

4 solutions
Top badges earned
Boost 1
Affirm 3
Affirm 1
View profile

Avatar
Boost 1
Level 2
gauravahuja11
Level 2

Like

1 like

Total Posts

9 posts

Correct reply

4 solutions
Top badges earned
Boost 1
Affirm 3
Affirm 1
View profile
gauravahuja11
Level 2

08-12-2016

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

Answers (0)