ionic-native-datepicker
v1.0.5
Published
Ionic component to take date
Downloads
5
Readme
Ionic Native Date Picker (Date Picker Plugin Wrapper)
This is an ionic 4 plugin to take date using native date-picker functionality. This plugin is based on ionic native date picker.
Disclaimer
This project was tested in ionic 4.0.0 for my personal purposes. Due to this plugin is for my personal usage, it currently only support YYYY-MM-DD value as the output
How to use
- Install the plugin
npm install ionic-native-datepicker
- Import and add in app.module.ts
....
import { IonicnativedatepickerwrapperModule,IonicnativedatepickerProvider } from 'ionic-native-datepicker';
....
- In app.module.ts, add the module and provider to imports and providers sections
imports {
....
IonicnativedatepickerwrapperModule,
....
}
providers [
....
IonicnativedatepickerProvider,
....
]
- In component.module.ts, import and export the component
...
import { IonicnativedatepickerwrapperModule, IonicnativedatepickerComponent } from 'ionic-native-datepicker';
...
imports:[
IonicnativedatepickerwrapperModule
]
...
exports: [
...
IonicnativedatepickerComponent,
...
]
- Use it in respective html like this:
<ion-native-datepicker [(ngModel)]="time"></ion-native-datepicker>
// MM/DD/YYYY of the pictureData
<p>{{time}}</p>