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.

CommentFileSizeAuthor
#2 date-values-disappear.patch720 bytesjjwhitney

Comments

joelstein’s picture

I 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)

jjwhitney’s picture

StatusFileSize
new720 bytes

I think I've found a fix for this. Please test.

ambereyes’s picture

I have same problem. I will test patch.

joelstein’s picture

Status: Active » Reviewed & tested by the community

Yes! The patch in #2 fixes it. Thank you.

arlinsandbulte’s picture

Status: Reviewed & tested by the community » Needs review

@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.

mdorrell’s picture

+1. Patch is working for me

a_c_m’s picture

Status: Needs review » Needs work

Confirming patch 2 fixes the issue with the date, but you still loose the time.

arlinsandbulte’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.