Here's how to recreate it:
#1. Create a webform with date element
#2. Check "Use date picker"
#3. Date format "Long date - l, F j, Y (Monday, January 1, 2018)"
#4. Form validation - required
In form, select day between 1 to 9 (in any month).
Save the form.
Error: Date must be a valid date.
If I change the Date format (in #3) to "Medium date - D, m/d/Y (Mon, 01/01/2018)", it works.
Can someone recreate this and confirm if this is a bug?
Opinion: I think when we select the date in the picker, it shows as "Monday, January 01, 2018" instead of "Monday, January 1, 2018" with the added zero. Is that the cause? Not sure.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2933792-3.patch | 1.96 KB | jrockowitz |
| |||
#2 | webform.webform.issue_2933792.yml | 3.02 KB | jrockowitz |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe attached webform can be used to replicate this issues and yes "Monday, January 01, 2018" is causing the validation error.
Comment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedAttached patch fixes the issue and adds some additional comments to the "Convert a PHP date format to a jQueryUI Datepicker date format" code.
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI committed the patch. Please download the latest dev release to review.