clrDate is a custom third party directive without an exportAs statement.
source code
@Directive({
selector: '[clrDate]',
host: {
'[class.clr-input]': 'true',
},
providers: [DatepickerFocusService],
})
export class ClrDateInput extends WrappedFormControl<ClrDateContainer> implements OnInit, AfterViewInit, OnDestroy {
@Input() placeholder: string;
@Output('clrDateChange') dateChange: EventEmitter<Date> = new EventEmitter<Date>(false);
@Input('clrDate')
...
}
I want to be able to get a reference to it from inside my controller as well as my customDirective. How can I do that?
<clr-date-container customDirective>
<label for="dateControl">Requirement Date</label>
<input id="dateControl" type="date" [placeholder]="'TT.MM.YYYY'" [(clrDate)]="item.requirementDate" (clrDateChange)="onChange($event)" [ngModel]="null" name="requirementDate"/>
<clr-control-error>{{ 'FORMS.VALIDATION.DATE_INVALID' | translate }}</clr-control-error>
</clr-date-container>