[BUGFIX] EXT:form - fix DatePicker html output 61/53361/3
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Fri, 30 Jun 2017 07:19:11 +0000 (09:19 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 6 Jul 2017 17:16:35 +0000 (19:16 +0200)
- change input type to "text"
- change readonly attribute value to "readonly"

Resolves: #81714
Releases: master, 8.7
Change-Id: If5f51b84e4548475c61f7e11523962bea92c3f3c
Reviewed-on: https://review.typo3.org/53361
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Henrik Elsner <helsner@dfau.de>
Tested-by: Henrik Elsner <helsner@dfau.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/form/Classes/ViewHelpers/Form/DatePickerViewHelper.php

index 45d79bd..66df1da 100644 (file)
@@ -87,7 +87,7 @@ class DatePickerViewHelper extends AbstractFormFieldViewHelper
         $name = $this->getName();
         $this->registerFieldNameForFormTokenGeneration($name);
 
-        $this->tag->addAttribute('type', 'input');
+        $this->tag->addAttribute('type', 'text');
         $this->tag->addAttribute('name', $name . '[date]');
 
         if ($this->hasArgument('id')) {
@@ -101,7 +101,7 @@ class DatePickerViewHelper extends AbstractFormFieldViewHelper
         }
 
         if ($enableDatePicker) {
-            $this->tag->addAttribute('readonly', true);
+            $this->tag->addAttribute('readonly', 'readonly');
             if (!$previewMode) {
                 $datePickerDateFormat = $this->convertDateFormatToDatePickerFormat($dateFormat);
                 $this->renderInlineJavascript($id, $datePickerDateFormat);