I'm new to ionic and I'm playing with ionic 2 beta. I'm trying to implement a native datepicker using cordova plugin like in the documentation.
I've fully copy/paste the example, and I get "ReferenceError: DatePicker is not defined
on Nexus 5 Emulator and Archos android phone.
openDatePicker() {
var options = {
date: new Date(),
mode: 'date'
};
function onSuccess(date) {
alert('Selected date: ' + date);
}
function onError(error) { // Android only
alert('Error: ' + error);
}
DatePicker.show(options, onSuccess, onError);
}
I've searched a lot and found nothing about this, maybe I'm doing it wrong with cordova plugin on Ionic 2?