[BUGFIX] Followup to DateTimePicker exchange
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / FormEngine.php
index 3f72c29..851873c 100644 (file)
@@ -4055,6 +4055,9 @@ class FormEngine {
 
                        $this->loadJavascriptLib('sysext/backend/Resources/Public/JavaScript/jsfunc.evalfield.js');
                        $this->loadJavascriptLib('sysext/backend/Resources/Public/JavaScript/jsfunc.tbe_editor.js');
+                       // Needed for FormEngine manipulation (date picker)
+                       $dateFormat = ($GLOBALS['TYPO3_CONF_VARS']['SYS']['USdateFormat'] ? array('MM-DD-YYYY', 'HH:mm MM-DD-YYYY') : array('DD-MM-YYYY', 'HH:mm DD-MM-YYYY'));
+                       $pageRenderer->addInlineSetting('DateTimePicker', 'DateFormat', $dateFormat);
 
                        // support placeholders for IE9 and lower
                        if ($this->clientInfo['BROWSER'] == 'msie' && $this->clientInfo['VERSION'] <= 9) {