Hiya...
This is just a minor bug, but it displays an error which might be confusing for users filling out forms with dates using the select widget. On my site the 'From Date' is set as required, and the 'To Date' as optional. I've only tested this with the following granularity: Day/Month/Year Hour:Mins
If any of the day/month/year fields don't have, the form shows the following errors:
- field is required.
- field is required.
- field is required.
- field is required.
- field is required.
- Field Date From date has errors. The year must be a number between 1 and 4000. The month must be a number between 1 and 12. The day must be a number between 1 and 31.
It looks like the errors for all the fields are being added by date_select_validate() in date_api_elements.inc but because each field doesn't explicity have a title the field name is blank when displayed to the user.
If day/month/year is set, but hours:mins are left blank, the following error is shown:
- field is required.
- field is required.
Hope this helps, sorry I haven't had the chance to dig around for more info.
Comment | File | Size | Author |
---|---|---|---|
#3 | 466134.3.field-errors.patch | 744 bytes | Bao Truong |
#2 | 466134.2.field-errors.patch | 879 bytes | deviantintegral |
Comments
Comment #1
deviantintegral CreditAttribution: deviantintegral commentedI'm running into this as well. The issue appears to actually be with the underlying date form element.
Comment #2
deviantintegral CreditAttribution: deviantintegral commentedIt looks like each sub-element is having #required set on it, which is throwing the extra errors. If the property is removed, validation still fails the element as the value isn't within the specified range. I've tested with date_select with dropdowns and textfields, but not anything higher up like the CCK date field.
Comment #3
Bao Truong CreditAttribution: Bao Truong commentedHere is a git version for the 6.x-2.9 version of the date module
Comment #5
DamienMcKennaUnfortunately the D6 version of this module is no longer supported, but we appreciate the time you put into this. If this problem is relevant for D7 too, please reopen the issue. Thanks.