Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initializing date input with 'null' value triggers angular 'required' error upon entering valid date 1st time #21

Open
kaydeejay opened this issue Jun 25, 2021 · 0 comments

Comments

@kaydeejay
Copy link

Describe the bug
ngx-tiny/date-picker @10.0.2
angular @12.0.3
storybook @6.3

When using date input with datepicker, initializing input with 'null' value triggers angular "required"
date-picker-required-error2
error state upon entering in a valid date. Error goes away upon re-entering the same date or another valid date.

export const datepickerCtrl = new FormControl(null, [
  VUI_VALIDATORS.date('M/D/YYYY'),
  Validators.required
]);

replacing null with new Date() removes this behavior, but desired behavior would be to be able to initialize the input as blank.

Versions (please complete the following information):

  • OS: Windows 10
  • Browser: chrome Version 90.0.4430.93 (Official Build) (64-bit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant