Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I saw that but unfortunately that is only called when the user tabs out of the field? Commented Nov 13, 2018 at 16:14
  • Here is a stack blitz. Unfortunately dateInput and dateChange only fire when it thinks it can parse a date. stackblitz.com/angular/… Commented Nov 13, 2018 at 16:28
  • 1
    updated the answer, you can make use of our traditional keyboard events. Commented Nov 13, 2018 at 16:46
  • Thanks. The keyUp event works. It ends up being clunky for us because we have a generic page validation that only triggers when a) field is dirty or b) user presses save. In this case the field is not dirty because it cannot parse. I can bypass this with boilerplate code but it starts getting ugly based on the number of places used. Commented Nov 13, 2018 at 17:30
  • Your problem statement says that you needed the validation on key strokes, right? Commented Nov 13, 2018 at 18:24