Does anyone know how to get jQuery UI date picker working in an AngularJS 2 app?
I've used jQuery UI date picker before in AngularJS 1.
Does anyone know how to get jQuery UI date picker working in an AngularJS 2 app?
I've used jQuery UI date picker before in AngularJS 1.
You could do the following.
import {Component, OnInit, View} from 'angular2/core';
import {FORM_DIRECTIVES, CORE_DIRECTIVES} from 'angular2/common';
@Component({
selector:'calendar',
template:'<h3>calendar</h3><div id="calendar"></div>'
})
export class jQCalendar implements OnInit{
constructor(){}
ngOnInit(){
var calendar = (<HTMLSelectElement>document.getElementById('calendar'));
$(calendar).datepicker();
}
}
Here is a plnkr http://plnkr.co/edit/92E0Er6kUxIS4E8hRgwI?p=preview