Since we can now set min/max dates for a field, it'd be really helpful if min/max validation of dates could have a rolling date requirements - e.g. things that parse with strtotime().

Examples:

- Date must be in the past
- Date must be in the future
- Date must be within 2 and 7 days in the future, etc

Comments

sammarley-jarrett created an issue. See original summary.

jrockowitz’s picture

Makes sense that #min, #max, and even the #default_value for date and datelist elements should support GNU Date Input Formats.

  • jrockowitz committed c21997e on 2807579-improve-date-element
    Issue #2807579: Add rolling date validation options
    
jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new11.55 KB

The patch passes all the tests I will commit to the dev release.

Status: Needs review » Needs work

The last submitted patch, 4: add_rolling_date-2807579-3.patch, failed testing.

  • jrockowitz committed 4a7ab32 on 2807579-improve-date-element
    Issue #2807579: Add rolling date validation options. Fix broken tests.
    
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new11.56 KB

  • jrockowitz committed 6284f1a on 8.x-1.x
    Issue #2807579 by jrockowitz, sammarley-jarrett: Add rolling date...
jrockowitz’s picture

Status: Needs review » Fixed
sammarley-jarrett’s picture

THANK YOU @jrockowitz!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.