atais / ng2-eonasdan-datetimepicker

A wrapper directive around the Eonasdan Datepicker v4 component.
MIT License
34 stars 23 forks source link

Input doesn't change its state to touched on focus out #47

Closed vjbhaskar93 closed 6 years ago

vjbhaskar93 commented 6 years ago

Hi,

I am using a2e-datetimepicker for reactive form input.

By default, I need to maintain the input as NULL and need to validate form when input is focused out.

Form Input doesn't change to touched on input focus out. Please fix this @fetrarij .

fetrarij commented 6 years ago

Hi @vjbhaskar93 ,

May be it's related with the bug I found and fixed last week.

bugfix: this set the value to 'false' when clearing the picker

https://github.com/atais/ng2-eonasdan-datetimepicker/commit/0a516d9f06daf4d01a9c3ef0062485371276160c

I commited a new build in master branch, could you check this and confirm after?

vjbhaskar93 commented 6 years ago

I just tried the latest install, still the issue persist.

fetrarij commented 6 years ago

Could you reproduce this on plnkr or stackblitz? this one is already I created: https://stackblitz.com/edit/angular-vvzsm5 , fork it and update (if you could have the source from master that would be good)

vjbhaskar93 commented 6 years ago

The problem is that I need the input date - empty while initializing the form. And I'm handling the validation using the input status touched. In this case, I'm getting the validation required error on form initialization. Please check this plunker

fetrarij commented 6 years ago

Thanks @vjbhaskar93 for reporting. v0.1.1 is now released.

vjbhaskar93 commented 6 years ago

Thanks @fetrarij. It's working amazingly now. You're the best.