Hi,
I want to implement clock picker similar to ClockPicker. I’ve been looking very vigorously for almost week now, but had no success. So I thought of integrating jquery clock picker plugin by
npm install clockpicker --save.
I followed all instructions given in Typescript — Integrate jQuery Plugin in your Project | by Netanel Basal | Medium and I was able to integrate bootstrap-daterangepicker. So tought same instuctions will work for jquery clockpicker, but doesn’t work.
I ran this steps
npm install jquery --save
npm install @types/jquery --save
npm install clockpicker --save
import * as $ from ‘jquery’;
import ‘clockpicker’; //similar to import ‘bootstrap-daterangepicker’;
@Directive({
selector: “[clockpicker]”
})
class DaterangepickerDirective {
constructor(private el: ElementRef) {}
ngOnInit() {
$(this.el.nativeElement).clockpicker();
}
}and finally included
interface JQuery {
clockpicker(options?: any, callback?: Function) : any;
}
in new typings.d.ts file which I added to src folder
I’m getting cannot find module clockpicker but I can see clockpicker in node modules
As I said earlier same insturctions work for bootstrap-daterangepicker but not for clockpicker. What am I missing.
Please help