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

ui: date-picker - the invalid status is shown even if the picker is pristine #1257

Closed
christophercr opened this issue Apr 17, 2019 · 0 comments

Comments

@christophercr
Copy link
Collaborator

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/NationalBankBelgium/stark/blob/master/CONTRIBUTING.md#got-a-question-or-problem

Current behavior

When a date picker is initialized as empty and with the required validator, the picker is shown as invalid after being initialized.

Expected behavior

The date picker should be shown as invalid only when the user has interacted with the picker or he has changed its value.

Minimal reproduction of the problem with instructions

  • Add a stark-date-picker element to your template.
  • Provide a FormControl to the date picker. Initialize the form control with undefined and add the required validator to it.
  • Run the application. The date picker will be immediately shown as invalid and with the "required" error message.

What is the motivation / use case for changing the behavior?

Better UX.

Environment


Angular version: X.Y.Z
Stark version: 10.0.0-beta.6, 10.0.0-beta.7

@christophercr christophercr added this to the 10.0.0-beta.8 milestone Apr 17, 2019
@christophercr christophercr self-assigned this Apr 17, 2019
christophercr added a commit to christophercr/stark that referenced this issue Apr 18, 2019
christophercr added a commit to christophercr/stark that referenced this issue Apr 18, 2019
christophercr added a commit to christophercr/stark that referenced this issue Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant