2

owl-date-time pickerType property is not not working with Angular 4.

<owl-date-time [pickerType]="'timer'" [(ngModel)]="selectedStartDate" [min]="minDate">

Can't bind to 'pickerType' since it isn't a known property of 'owl-date-time'.

npm: ng-pick-datetime-highlight

Unable to import modules OwlDateTimeModule

HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
Sreekanth Reddy
  • 483
  • 1
  • 6
  • 17

1 Answers1

5

You have to add OwlDateTimeModule and OwlNativeDateTimeModule to your @NgModule like this:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { MyTestApp } from './my-test-app';

import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';

@NgModule({
 imports: [ 
     BrowserModule, 
     OwlDateTimeModule, 
     OwlNativeDateTimeModule,
 ],
 declarations: [ MyTestApp ],
 bootstrap:    [ MyTestApp ]
})
export class MyTestAppModule {}

see here:

https://www.npmjs.com/package/ng-pick-datetime

HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
  • Thanks for the quick help. I am currently using the ng-pick-datetime version ^5.0.0-beta.14. It is giving following error: modules/ng-pick-datetime/picker.module"' has no exported member 'OwlDateTimeModule'. Is it because of version issue? – Sreekanth Reddy Mar 30 '18 at 18:32
  • is this: https://www.npmjs.com/package/ng-pick-datetime-highlight what you have used ? or can you give the link you used or update your question ? – HDJEMAI Mar 30 '18 at 18:36