Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I create a Webform node that includes two optional date fields, say, Test date 1 and Test date 2.
If I enter the first date, or if I leave both blank, the form works fine.
However, if I enter the second date and leave the first one blank, I get an error when I try to submit the form:
"Entered Test date 2 is not a valid date."
This happens despite that the date is actually valid.
Comment | File | Size | Author |
---|---|---|---|
#2 | webform_multiple_date.patch | 3.95 KB | quicksketch |
Comments
Comment #1
quicksketchThanks, I've reproduced this bug and I'm working on correcting it.
Comment #2
quicksketchIt looks like the problem was the static variable we were using to validate the month, day, and year together. Because we weren't keeping track of which date element we were validating, empty dates would trigger as being filled out (though with empty values). This patch should correct the problem. I've committed it to CVS.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.