Bug #33629
closed
datepicker with datetime field does not set current time as default
Added by Simon Schaufelberger almost 13 years ago.
Updated about 7 years ago.
Category:
Backend User Interface
Description
In tt_news for example i have a datetime field. When i pick a date with the datepicker, the default time is set to 0:00. Changeing the time manually and picking another day overwrites the time again to 0:00
I would expect that the time is set to the current time and will not change when picking another day with the datepicker.
This issue is related to #25043.
Files
The main source part is in:
t3lib/js/extjs/tceforms.js starting from line 63.
i changed to code to this:
if (index === 1 && oldValue !== undefined) {
//datetimefield, preserve time information
date.setHours(oldValue.getHours());
date.setMinutes(oldValue.getMinutes());
} else {
oldValue = Date();
date.setHours(oldValue.getHours());
date.setMinutes(oldValue.getMinutes());
}
but this does not solve the overwriting of the now current time.
Attached is a patch that backports all necessary files from 4.6 to 4.5 (the only version where this is happening).
Thanks to punkt.de for fixing this bug!
hi Benny!
thank you very much! Can you do me a favor and push this to gerrit please?
Please ask the RM of 4.5 (Ernesto) if he wants this feature backported. If he agrees the patch can be pushed to the TYPO3_4-5_backports branch.
- Assignee set to Ernesto Baschny
- Target version set to 4.5.14
Hi Ernesto,
can this BUG be backported to 4.5? This was working well in earlier releases like expected.
- Category set to Backend User Interface
- Status changed from New to Accepted
- Target version changed from 4.5.14 to 4.5.16
@Simon, thanks for bringing that to my attention by mail. I have missed the notification from Forge for this issue.
This seems to be an usability fix and indeed this can and should be solved also on 4.5. The backport from Benni seems to work, and as it clearly fixes the bug it can of course be backported. Remains to be evaluated during the review if there aren't any other side-effects, but since the code works on 4.6 and later, it should be ok.
+1 on backporting
- Status changed from Accepted to Under Review
- Status changed from Under Review to Resolved
- Target version changed from 4.5.16 to 4.5.18
- Status changed from Resolved to Closed
Also available in: Atom
PDF