问题
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
回答1:
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
来源:https://stackoverflow.com/questions/49579333/cant-bind-to-pickertype-since-it-isnt-a-known-property-of-owl-date-time