ng2-ui / datetime-picker

Angular2 DateTime Picker
https://ng2-ui.github.io/#/datetime-picker
MIT License
121 stars 62 forks source link

Set template-driven form to dirty #117

Closed rvdhooft closed 7 years ago

rvdhooft commented 7 years ago

Currently, it looks like only dynamic forms are being set to dirty; it would be nice to support template-driven forms as well.

<form name="testForm" #testForm="ngForm">
        <input 
            name="testDate"
            [(ngModel)]="test"
            ng2-datetime-picker/>
</form>
testForm.dirty: {{testForm.dirty}}
allenhwkim commented 7 years ago

There is argument on this. http://stackoverflow.com/questions/39681258/angular2-ng-dirty-class-is-not-set-when-ngmodel-value-changes

rvdhooft commented 7 years ago

Interesting. I'll go ahead and close this. Thanks.