Issue Bug Closed

#81714No valid HTML output Form->DatePicker

Björn Paulsen 06/27/17, 15:38 updated 10/02/18, 10:58

Description

Hello Together,

the SysExt Form in Typo 3 8.7.2 renders wrong html for DatePicker.

This is wrong:

<input class="small form-control" id="kontakt-datepicker-1" type="input" name="tx_form_formframework[kontakt][datepicker-1][date]" placeholder="d.m.Y" readonly="1" />

This is right

<input class="small form-control" id="kontakt-datepicker-1" type="text" name="tx_form_formframework[kontakt][datepicker-1][date]" placeholder="d.m.Y" readonly="readonly" />

It is wrong in Class typo3/sysext/form/Classes/ViewHelpers/Form/DatePickerViewHelper.php:
Line 90:

Wrong:

$this->tag->addAttribute('type', 'input');

Right:

$this->tag->addAttribute('type', 'text');

Line 104:

Wrong:

$this->tag->addAttribute('readonly', true);

Right:

$this->tag->addAttribute('readonly', 'readonly');

Thank you for change.

Reviews 2