Date Picker


The DatePicker plugin allows the user to fetch date or time using native dialogs.

Ionic 日历Date Picker插件的安装(Installation)

ionic cordova plugin add cordova-plugin-datepicker npm install @ionic-native/date-picker

Ionic 日历Date Picker插件支持的平台(Supported Platforms)

  • Android
  • iOS
  • Windows

Ionic 日历Date Picker插件的用法(Usage)

import { DatePicker } from '@ionic-native/date-picker';

constructor(private datePicker: DatePicker) { }

  date: new Date(),
  mode: 'date',
  androidTheme: this.datePicker.ANDROID_THEMES.THEME_HOLO_DARK
  date => console.log('Got date: ', date),
  err => console.log('Error occurred while getting date: ', err)