2

owl-date-time pickerType 属性不适用于 Angular 4。

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

无法绑定到“pickerType”,因为它不是“owl-date-time”的已知属性。

npm:ng-pick-datetime-highlight

无法导入模块 OwlDateTimeModule

4

1 回答 1

4

您必须像这样将 OwlDateTimeModule 和 OwlNativeDateTimeModule 添加到您的 @NgModule 中:

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 {}

看这里:

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

于 2018-03-30T18:20:27.237 回答