Closed himdel closed 5 years ago
This does change the previous behaviour where an empty date would fail validation even when it was not a required field.
I think that was a bug, but just in case it's not... :)
:+1:
Hammer backport details:
$ git log -1
commit 1d7732078b6fb3ee2b6ef72586529629a723f2a6
Author: Harpreet Kataria <hkataria@redhat.com>
Date: Fri Jul 19 09:22:44 2019 -0400
Merge pull request #401 from himdel/datetimesubmit-bz1728600
Dialog user - fix validation for date & date&time when field is required; clearing the fields
(cherry picked from commit 28592b743fd4092f1c8b9d4df8e984ba85dc4197)
https://bugzilla.redhat.com/show_bug.cgi?id=1731991
Fixes some fallout from #399 and some earlier issues:
_.isEmpty(new Date()) === true
Cannot read property 'getFullYear' of null
Now, date & date&time should behave the same, both go to
null
when cleared, both fail validation whennull
and required, neither fail validation when non-null or not required.Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1728600
Cc @eclarizio , @romanblanco