From 785702f35642bbd77c028d5150b933b402fae16b Mon Sep 17 00:00:00 2001
From: Torsten Oppermann <torsten@sgalinski.de>
Date: Tue, 1 Aug 2017 17:05:59 +0200
Subject: [PATCH] [TASK] Fixing datetimepicker

---
 Resources/Private/Layouts/Queue.html         |  5 +++--
 Resources/Private/Partials/Queue/Filter.html | 10 ++--------
 Resources/Public/Scripts/Backend.js          |  2 --
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/Resources/Private/Layouts/Queue.html b/Resources/Private/Layouts/Queue.html
index cac6d1e7..2469fe2b 100644
--- a/Resources/Private/Layouts/Queue.html
+++ b/Resources/Private/Layouts/Queue.html
@@ -1,9 +1,10 @@
 {namespace sgm=SGalinski\SgMail\ViewHelpers}
-<f:be.container enableClickMenu="FALSE" loadExtJs="FALSE" includeCssFiles="{0: '{f:uri.resource(path: \'StyleSheets/backend.css\')}'}"
+<f:be.container enableClickMenu="FALSE" loadExtJs="TRUE" loadJQuery="TRUE" includeCssFiles="{0: '{f:uri.resource(path: \'StyleSheets/backend.css\')}'}"
 	includeRequireJsModules="{
 	0: 'TYPO3/CMS/Backend/AjaxDataHandler',
 	1: '{f:if(condition: \'{typo3Version} < 8000000 \', then: \'TYPO3/CMS/Backend/ClickMenu\', else: \'TYPO3/CMS/Backend/ContextMenu\')}',
-	2: 'TYPO3/CMS/Backend/Tooltip'}">
+	2: 'TYPO3/CMS/Backend/Tooltip',
+	3: 'TYPO3/CMS/Backend/DateTimePicker'}">
 	<sgm:addJavaScriptFile javaScriptFile="{f:uri.resource(path: 'Scripts/Backend.js')}" />
 	<sgm:inlineLanguageLabels labels="backend.delete_template, backend.send_mail_manually, backend.send_mail_again" />
 	<div class="module" data-module-id="" data-module-name="">
diff --git a/Resources/Private/Partials/Queue/Filter.html b/Resources/Private/Partials/Queue/Filter.html
index 9921d302..77acec0e 100644
--- a/Resources/Private/Partials/Queue/Filter.html
+++ b/Resources/Private/Partials/Queue/Filter.html
@@ -15,10 +15,7 @@
 				<div class="form-group">
 					<label for="filter-from-date"><f:translate key="backend.filter.date_from" /></label>
 					<div class='input-group date' id='datetimepicker_from'>
-						<f:form.textfield id="filter-from-date" class="form-control" />
-						<span class="input-group-addon">
-							<span class="glyphicon glyphicon-calendar"></span>
-						</span>
+						<f:form.textfield id="filter-from-date" data="{date-type: 'datetime'}" class="form-control t3js-datetimepicker"  />
 					</div>
 				</div>
 			</div>
@@ -26,10 +23,7 @@
 				<div class="form-group">
 					<label for="filter-to-date"><f:translate key="backend.filter.date_to" /></label>
 					<div class='input-group date' id='datetimepicker_to'>
-						<f:form.textfield id="filter-to-date" class="form-control" />
-						<span class="input-group-addon">
-							<span class="glyphicon glyphicon-calendar"></span>
-						</span>
+						<f:form.textfield id="filter-to-date" data="{date-type: 'datetime'}" class="form-control t3js-datetimepicker" />
 					</div>
 				</div>
 			</div>
diff --git a/Resources/Public/Scripts/Backend.js b/Resources/Public/Scripts/Backend.js
index a2d8468a..b25a5149 100644
--- a/Resources/Public/Scripts/Backend.js
+++ b/Resources/Public/Scripts/Backend.js
@@ -32,8 +32,6 @@
 	}
 
 	$(document).ready(function() {
-		// $('#datetimepicker_to').datetimepicker();
-		// $('#datetimepicker_from').datetimepicker();
 		$('.reset-btn').on('click', resetTemplateListener);
 		$('.btn-send-now').on('click', sendMailListener);
 		$('.btn-resend').on('click', resendMailListener);
-- 
GitLab