Needs work
Project:
Date
Version:
7.x-2.x-dev
Component:
Date API
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
14 Nov 2014 at 19:34 UTC
Updated:
20 Dec 2015 at 22:35 UTC
Jump to comment: Most recent
I came across this issue while using a date_popup form element with the format d-M-Y (e.g., 14-Nov-2014). If the user types the date in the field with any capitalization scheme other than the first letter in uppercase and the next two in lowercase, the field value doesn't pass the date_popup validation. For example, "Nov" works, but "NOV" and "nov" do not. The attached patch allows month names (full and abbreviated) regardless of the case to be used to create DateObjects, and thus also solves the date_popup form validation problem.
| Comment | File | Size | Author |
|---|---|---|---|
| date-case_insensitive_month_names.patch | 1021 bytes | ChrisLaFrancis |
Comments
Comment #1
ChrisLaFrancis commentedIf anyone is curious, as a workaround for this issue I created the following function and added it to the date_popup element's '#element_validate' attribute. It gets called before date_popup_validate() so it can fix the case if necessary.
Comment #2
anpolimusThis task needs test first.
Comment #3
anpolimusComment #4
anpolimus