-
Notifications
You must be signed in to change notification settings - Fork 387
General: Date pickers accept unparseable input and silently save an empty date #13471
Copy link
Copy link
Open
Labels
accountPull requests that affect the corresponding modulePull requests that affect the corresponding moduleatlasPull requests that affect the corresponding modulePull requests that affect the corresponding modulebugclientPull requests that update TypeScript code. (Added Automatically!)Pull requests that update TypeScript code. (Added Automatically!)communicationPull requests that affect the corresponding modulePull requests that affect the corresponding modulecourseexercisePull requests that affect the corresponding modulePull requests that affect the corresponding modulefileuploadPull requests that affect the corresponding modulePull requests that affect the corresponding modulelecturePull requests that affect the corresponding modulePull requests that affect the corresponding modulemodelingPull requests that affect the corresponding modulePull requests that affect the corresponding modulequizPull requests that affect the corresponding modulePull requests that affect the corresponding module
Description
Metadata
Metadata
Assignees
Labels
accountPull requests that affect the corresponding modulePull requests that affect the corresponding moduleatlasPull requests that affect the corresponding modulePull requests that affect the corresponding modulebugclientPull requests that update TypeScript code. (Added Automatically!)Pull requests that update TypeScript code. (Added Automatically!)communicationPull requests that affect the corresponding modulePull requests that affect the corresponding modulecourseexercisePull requests that affect the corresponding modulePull requests that affect the corresponding modulefileuploadPull requests that affect the corresponding modulePull requests that affect the corresponding modulelecturePull requests that affect the corresponding modulePull requests that affect the corresponding modulemodelingPull requests that affect the corresponding modulePull requests that affect the corresponding modulequizPull requests that affect the corresponding modulePull requests that affect the corresponding module
Type
Projects
StatusShow more project fields
Todo
Describe the bug
jhi-date-time-pickerprovidesNG_VALUE_ACCESSORbut noNG_VALIDATORS. On unparseable or out-of-range input it writesundefinedto the bound form control and renders its own red "is missing or not valid" message, but the control itself stays valid. Forms that gate their submit button on form validity therefore stay submittable, and the date the user typed is dropped without a word.Competency creation is the reported case: the form gates submit on
!form.invalidandsoftDueDatecarries no validator, so nonsense in "Recommended date of completion" saves a competency with no soft due date.Seven forms already work around this by hand, reading
datePickerComponent()?.isValid()ordateInput.validinto their own validity computation: lecture attachments, text unit, online unit, attachment video unit, and the text / modeling / file upload exercise update forms. The forms without that workaround have the bug.Found by @Pomodorka3 on TS3 while reviewing #13443.
To Reproduce
asdasdinto "Recommended date of completion"Expected behavior
While the field holds unparseable or out-of-range input, the bound form control is invalid, so the surrounding form cannot be submitted until the entry is corrected or cleared.
Which version of Artemis are you seeing the problem on?
9.9 (TS3, develop)
What browsers are you seeing the problem on?
Chrome