I've tested this with a clean install:
- Drupal 6.20
- CCK 6.x-2.9
- Date 6.x-2.x-dev (2011-Jan-19)
- jQuery UI 6.x-1.4 (with jQuery UI 1.7)
- jQuery Update 6.x-2.0-alpha1
I created a CCK "Date" field, with "Text Field with Date Pop-up calendar" widget, and used all the default values in the field settings form.
When I create a new node, the date popup works great. I populate the date fields with valid values, but leave the (required) title empty, and click "Save". I get the usual "Title field is required" message, but the date fields are empty. This is further a nuisance when editing a node, because those values are lost (unless you start all over with editing).
The problem does not exist if I use any of the other two Date widgets.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | date-values-disappear.patch | 720 bytes | jjwhitney |
Comments
Comment #1
joelstein commentedI also just tested with the following configuration, and still get the same problem (with jQuery UI 1.6 and no jQuery Update).
- Drupal 6.20
- CCK 6.x-2.9
- Date 6.x-2.x-dev (2011-Jan-19)
- jQuery UI 6.x-1.4 (with jQuery UI 1.6)
Comment #2
jjwhitney commentedI think I've found a fix for this. Please test.
Comment #3
ambereyes commentedI have same problem. I will test patch.
Comment #4
joelstein commentedYes! The patch in #2 fixes it. Thank you.
Comment #5
arlinsandbulte commented@KarenS, if you approve, I can commit #2 above.
#2 might give a clue on how to fix the issue where the date field is cleared if it fails validation (D6 & D7 issue).... that probably should be a separate issue, and I think there is one already created for this, but I could not find it.
In Date 6.x-2.x-dev, I reproduced the problem and the patch in #2 fixes it...
Without the patch in #2:
If a user enters a valid date, but something else (like the title) fails validation, then the date field is cleared and all date information must be re-entered.
With the patch in #2:
If a user enters a valid date, but something else (like the title) fails validation, the date filed is KEPT and does not need to be re-entered.
In Date 7.x-2.x-dev, the issue as described above is not present.
HOWEVER, in both Date 6.x-2.x-dev & 7.x-2.x-dev:
If a user enters an invalid date causing the date field to fail validation, the date field is cleared and all date information must be re-entered.
It would be much better if the (invalid) data was not cleared so the user did not need to re-enter all information, but rather, figure out what was wrong with what they entered and correct it.
This is a known issue, but I could not find the issue regarding this.
Comment #6
mdorrell commented+1. Patch is working for me
Comment #7
a_c_m commentedConfirming patch 2 fixes the issue with the date, but you still loose the time.
Comment #8
arlinsandbulte commentedI committed #2 above:
http://drupalcode.org/project/date.git/commit/e29ec36