We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 829294c + 2b65ec3 commit 4446004Copy full SHA for 4446004
wcfsetup/install/files/lib/system/form/builder/field/DateFormField.class.php
@@ -291,10 +291,17 @@ public function readValue()
291
$this->getDocument()->hasRequestData($this->getPrefixedId())
292
&& \is_string($this->getDocument()->getRequestData($this->getPrefixedId()))
293
) {
294
- $this->value = $this->getDocument()->getRequestData($this->getPrefixedId());
+ $value = $this->getDocument()->getRequestData($this->getPrefixedId());
295
+ $this->value = $value;
296
297
if ($this->value === '') {
298
$this->value = null;
299
+ } elseif ($this->getValueDateTimeObject() === null) {
300
+ try {
301
+ $this->value($value);
302
+ } catch (\InvalidArgumentException) {
303
+ $this->value = null;
304
+ }
305
}
306
307
0 commit comments