Bug #33629
closeddatepicker with datetime field does not set current time as default
0%
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
Updated by Simon Schaufelberger over 12 years ago
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.
Updated by Benni Mack over 12 years ago
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!
Updated by Simon Schaufelberger over 12 years ago
hi Benny!
thank you very much! Can you do me a favor and push this to gerrit please?
Updated by Jigal van Hemert over 12 years ago
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.
Updated by Simon Schaufelberger over 12 years ago
- 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.
Updated by Ernesto Baschny over 12 years ago
- 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
Updated by Gerrit Code Review about 12 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/11568
Updated by Gerrit Code Review about 12 years ago
Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/11568
Updated by Ernesto Baschny about 12 years ago
- Status changed from Under Review to Resolved
- Target version changed from 4.5.16 to 4.5.18
Merged in 4.5. Thanks!
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed