ng2-datetime icon indicating copy to clipboard operation
ng2-datetime copied to clipboard

timepicker is not a function!

Open mohammad-shadmehr opened this issue 8 years ago • 2 comments

I have got a field for time only as: <datetime name="startTime" [datepicker]="false" [(ngModel)]="timeOfDay.startTime"></datetime> and I am getting this error: TimeOfDayComponent.html:16 ERROR TypeError: $(...).timepicker is not a function at NKDatetime.webpackJsonp.../../../../ng2-datetime/src/ng2-datetime/ng2-datetime.ts.NKDatetime.init (ng2-datetime.ts:197) at NKDatetime.webpackJsonp.../../../../ng2-datetime/src/ng2-datetime/ng2-datetime.ts.NKDatetime.ngAfterViewInit (ng2-datetime.ts:88) at callProviderLifecycles (core.es5.js:11240) at callElementProvidersLifecycles (core.es5.js:11215) at callLifecycleHooksChildrenFirst (core.es5.js:11199) at checkAndUpdateView (core.es5.js:12296) at callViewAction (core.es5.js:12651) at execComponentViewsAction (core.es5.js:12583) at checkAndUpdateView (core.es5.js:12294) at callViewAction (core.es5.js:12651) at execEmbeddedViewsAction (core.es5.js:12609) at checkAndUpdateView (core.es5.js:12289) at callViewAction (core.es5.js:12651) at execComponentViewsAction (core.es5.js:12583) at checkAndUpdateView (core.es5.js:12294)

mohammad-shadmehr avatar Aug 03 '17 05:08 mohammad-shadmehr

Same problem here:

<datetime [timepicker]="false" [(ngModel)]="mymodel.dummydate"  name="dummydate" id="dummydate" #dummydate="ngModel"></datetime>

throws following error:

ERROR Error: Uncaught (in promise): TypeError: $(...).datepicker is not a function
TypeError: $(...).datepicker is not a function
    at NKDatetime.init (http://localhost:8080/vendor.js?f85377c60e47aebe7c9a:51943:58)
    at NKDatetime.ngAfterViewInit (http://localhost:8080/vendor.js?f85377c60e47aebe7c9a:51866:14)

gest01 avatar Aug 04 '17 13:08 gest01

You probably did not import the date and time picker dependencies.

wartab avatar Aug 04 '17 14:08 wartab