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

Input not re-validated after date selection. #448

Closed
konuch opened this issue Nov 15, 2019 · 3 comments
Closed

Input not re-validated after date selection. #448

konuch opened this issue Nov 15, 2019 · 3 comments

Comments

@konuch
Copy link

konuch commented Nov 15, 2019

What is the expected behavior?

Date input is properly re-validated, when invalid value is replaced by a valid date value using the datepicker.

What is the current behavior?

When user manually invalidates date input and error is shown, then enters a valid date value using the date picker, the input field is not re-validated and shows an error.

What are the steps to reproduce?

https://kkvillxpp.github.stackblitz.io/examples/date-picker-input

  1. Invalidate the input to trigger validation error. (delete the value, or enter invalid value)
  2. Open the datepicker and select a date.
  3. Valid date value is entered into the input, but errors are not removed.

Which versions of angular-bootstrap-datetimepicker, OS, TypeScript, browsers are affected?

Latest.

@dalelotts
Copy link
Owner

Thanks, I'm looking at this now.

dalelotts added a commit that referenced this issue Nov 17, 2019
…el value

When the user enters an invalid date (i.e. past date or total non-sense) the input validates and
adds 'ng-invalid' to the input. Then the model is updated to a valid input (i.e. not through the
input but rather the date-picker or an async call returning a value) the directive correctly sets
`ng-valid` on the input. Prior to this fix, the input would not re-validate when changes to the
model happened.

Fix #448
@dalelotts
Copy link
Owner

🎉 This issue has been resolved in version 4.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

dalelotts added a commit that referenced this issue Nov 17, 2019
… is set to valid date

fix #448 edge case for non-date input
dalelotts added a commit that referenced this issue Nov 17, 2019
… is set to valid date

fix #448 edge case for non-date input
@dalelotts
Copy link
Owner

🎉 This issue has been resolved in version 4.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

2 participants