Project

General

Profile

Actions

Bug #33629

closed

datepicker with datetime field does not set current time as default

Added by Simon Schaufelberger about 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend User Interface
Target version:
Start date:
2012-02-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #25043: datetime picker returns only a date and no time valueClosedSteffen Kamper2011-02-15

Actions
Related to TYPO3 Core - Bug #26674: Regression bug in tceforms.js Closed2011-05-06

Actions
Related to TYPO3 Core - Bug #31027: Date picker defectClosed2011-10-17

Actions
Actions #1

Updated by Simon Schaufelberger about 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.

Actions #2

Updated by Benni Mack about 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!

Actions #3

Updated by Simon Schaufelberger about 12 years ago

hi Benny!
thank you very much! Can you do me a favor and push this to gerrit please?

Actions #4

Updated by Jigal van Hemert about 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.

Actions #5

Updated by Simon Schaufelberger about 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.

Actions #6

Updated by Ernesto Baschny about 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

Actions #7

Updated by Gerrit Code Review almost 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

Actions #8

Updated by Gerrit Code Review almost 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

Actions #9

Updated by Ernesto Baschny almost 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!

Actions #10

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF