I am trying to use ng2-datepicker and I'm not getting the touched response from the input element. The datepicker-input is being flagged as touched but its not bouncing up to Angular.
<ng2-datepicker class="form-control ng-untouched ng-pristine ng-invalid" formcontrolname="datefound" _nghost-lur-40="" ng-reflect-name="datefound">
<div _ngcontent-lur-40="" class="datepicker-container u-is-unselectable">
<div _ngcontent-lur-40="" class="datepicker-input-container">
<input _ngcontent-lur-40="" class="datepicker-input ng-untouched ng-pristine ng-valid" type="text">
<div _ngcontent-lur-40="" class="datepicker-input-icon">
<i _ngcontent-lur-40="" class="ion-ios-calendar-outline"></i>
</div>
</div>
<!--template bindings={
"ng-reflect-ng-if": null
}-->
</div>
</ng2-datepicker>
Is there a way in Angular 2 to get the datepicker-input and attach the onTouchedCallback action to it? I don't want to modify the ng2-datepicker module so I want to do all of my code from the parent.
Can I do something similar to the following:-
form.get('datefound')('.datepicker-input').touched