[TASK] Show the "Today" button in DateTimePicker 05/54405/2
authorGianluigi Martino <gmartino27@gmail.com>
Sun, 15 Oct 2017 12:40:44 +0000 (14:40 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Mon, 16 Oct 2017 14:26:12 +0000 (16:26 +0200)
This patch enable the "Today" button on the bottom of the DateTimePicker.
Clicking the "Today" button will set the date and time to now.

Resolves: #82723
Releases: master, 8.7
Change-Id: I262e0206754b2a9e785a6f1184712ba8cc26ad12
Reviewed-on: https://review.typo3.org/54405
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/DateTimePicker.js

index 8c39672..8fb74df 100644 (file)
@@ -99,6 +99,8 @@ define(['jquery'], function($) {
                var type = $element.data('dateType');
                var options = {
                        sideBySide: true,
+                       showTodayButton: true,
+                       toolbarPlacement: 'bottom',
                        icons: {
                                time: 'fa fa-clock-o',
                                date: 'fa fa-calendar',