I am Trying to create an component of ng-pick-datetime but whenever I click on the Input field it doesn’t trigger any thing .It isn’t giving me any error and isn’t showing datetime picker.
My datePicker Component Code is
<input [owlDateTime]="dt2" placeholder="DateTime"/>
<span [owlDateTimeTrigger]="dt2"> <ion-icon name="add-circle"></ion-icon></span>
<owl-date-time #dt2></owl-date-time>
componnets.module.ts Code
import { NgModule } from '@angular/core';
import { DateTimePickerComponent } from "./date-time-picker/date-time-picker";
import { CommonModule } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
import { IonicModule } from 'ionic-angular';
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
declarations: [DateTimePickerComponent],
imports: [OwlDateTimeModule, OwlNativeDateTimeModule,IonicModule,CommonModule],
exports: [DateTimePickerComponent]
})
export class ComponentsModule {}
My app.module.ts code is
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { MyApp } from './app.component';
import { ApiProvider } from '../providers/api/api';
import { HttpModule } from '@angular/http'
import { Geolocation } from '@ionic-native/geolocation';
import { ComponentsModule } from '../components/components.module';
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
@NgModule({
declarations: [
MyApp,
],
imports: [
BrowserModule,
BrowserAnimationsModule,
// HttpClientModule,
ComponentsModule,
IonicModule.forRoot(MyApp),
HttpModule,
OwlDateTimeModule,
OwlNativeDateTimeModule,
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
Geolocation,
ApiProvider
]
})
export class AppModule {}
Any Help would be appreciated.