1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00

Fix issue where non-default date format could get lost in session values of InputfieldSelector.module

This commit is contained in:
Ryan Cramer
2017-03-19 06:27:20 -04:00
parent 4414a2db2b
commit 1f23b54f45

View File

@@ -1336,7 +1336,6 @@ class InputfieldSelector extends Inputfield implements ConfigurableModule {
protected function renderDateInput($name, $value, $useTime = false) {
$inputfield = $this->wire('modules')->get('InputfieldDatetime');
$inputfield->attr('name', $name);
$inputfield->attr('value', $value);
$inputfield->datepicker = InputfieldDatetime::datepickerFocus;
$inputfield->placeholder = $this->datePlaceholder;
$inputfield->dateInputFormat = $this->dateFormat;
@@ -1345,6 +1344,7 @@ class InputfieldSelector extends Inputfield implements ConfigurableModule {
$inputfield->timeInputFormat = $this->timeFormat;
$inputfield->placeholder .= ' ' . $this->timePlaceholder;
}
$inputfield->attr('value', $value);
$inputfield->renderReady();
return $inputfield->render();
}