Closed (duplicate)
Project:
Date
Version:
6.x-2.4
Component:
Date API
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2008 at 22:16 UTC
Updated:
29 Jan 2010 at 16:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
karens commentedI can't replicate this in the latest -dev code. It may have been fixed since reported.
Comment #3
les limI can confirm this. The reason is there's no "delete" key on certain keyboard configurations (like the MacBook I was using today by chance).
However, this is probably more of an issue with jQuery UI than Date Pop-up.
Comment #4
dsms commentedI can confirm this issue too. It has nothing to do with a delete-key or whatever may os-specific. Even when To-Date is set to empty,
this issue occurs. Example: I create an article with default from-date set to "now" and to-date set to empty. On saving, the to-date
gets automatically the same value like the from-date..
this appears when the input fields use jquery calendar.
as a workaround I test in my templates if value == value2, clear to-date and run a content_update($node) .. after that
the field is really empty ;)
I don't know exactly where this might come from, perhaps from a jQuery problem, but my firebug researches didnt reveal
anything :(
I am more convinced that you maybe mix up value and value2 on node save / content save.
I experience this issue since I use 2.1 and now 2.2
Comment #5
matytsio commentedI too confirm this. Created a node with To-Date optional and blank, then come back to Edit... now the To-Date field sets itself to the same value as the From-Date. It'll save the blank values if I specifically erase them, but I would have to do this every time I edit this node. Very inconvenient and easy to forget...
Tested with both 5.x-2.7 and 5.x-2.x-dev versions with same results.
Comment #6
Aquilasfx commentedsame problem..
Comment #7
bobgeier commentedCleaning up status.
Comment #8
bobgeier commentedLet's try this again. I can confirm that while the problem is less bad than when I originally posted, it is still present. Deleting a "To" date field no longer generates an error, but simply resets the "to" field to the from date. It is impossible to delete the "to" time field no matter how hard you try to make it go away.
I am using Macintosh equipment.
Comment #9
karens commentedThis is a Mac issue, it works fine in Windows. So I guess it is something about the jQuery used in the time field in that particular environment, which could be a jQuery bug or a bug in the timepicker code.
I'm not crazy about the timepicker and others have complained, but no one has provided any working alternatives. I guess for now I'll add an option to the site settings to turn the jQuery off for the timepicker so you can still use the jQuery popup calendar. You will then have to manually type values in for the time and will lose the timepicker's code that forces the values to only valid values.
Comment #10
dsms commentedits not only a Mac problem, I use FF and Opera on WinXP and the issue occurs here too.
Comment #11
matytsio commentedThe issue still exists for me, I'm on Win XP.
Tested on Linux, all the same - To Date is automatically set to match From Date when intentionally left blank.
Comment #12
zerolab commentedThe issue still exists.
Using Drupal 6.12
Tested on FF 3, Opera 10b on Ubuntu.
Comment #13
zerolab commentedit seems it has nothing to do with jQuery, from what I gather looking through the code.
I believe somewhere on the way, it doesn't take into account the possibility of having "to date" blank by default and not required.
Somewhere around the lines 469-489 in date/date_elements.inc there is a heavy error checking process that sets the to_date value to from_date in case it is empty, or throws an error if it fails.
I'll continue digging through the code, but conceptually, if someone sets the default value for the from/to fields to Blank in the field settings, in case they are not required, they should present no date.
Comment #14
zerolab commentedUPDATE:
this is the solution I came up with. Did not test with repeat dates.
p.s. I just realized in my case, the "To" date field was autopopulated with "From" date when left blank.
Comment #15
bobgeier commentedI guess for now I'll add an option to the site settings to turn the jQuery off for the timepicker so you can still use the jQuery popup calendar. You will then have to manually type values in for the time and will lose the timepicker's code that forces the values to only valid values.
That would be a nice option in any event.
Comment #16
jmlavarenne commentedThe 'To' date field should be allowed to be empty for Date fields that do not need a to Date.
For example, I'm using a Views list of nodes with a date field and I want to list the 'to' date field if it exists.
I don't want to list it if it's the same as the 'from' date.
Comment #17
jmlavarenne commentedhttp://drupal.org/node/523218