Hey guys,
I need to get a datepicker working and then use the date to do some math (determine how far away it is, and so on).
Coming from a web development background my first instinct was <input type="date">
but my research showed this doesn’t work on all android devices, and that its device specific not android verions specific… example: Samsung Galaxy S2 on Android 4.0.3 does support it, but the Google/Samsung Nexus S on the more recent Android 4.0.4 does not.
So I started looking at plugins and found this one https://github.com/VitaliiBlagodir/cordova-plugin-datepicker and installed it successfully using the cordova CLI but can’t get the datepicker to work…
using this code to try and initializing it…
/**
* Function to show the date picker
*/
$scope.showDatePicker = function($event) {
var options = {
date: new Date(),
mode: 'date'
};
datePicker.show(options, function(date){
if(date != 'Invalid Date') {
console.log("Date came" + date);
} else {
console.log(date);
}
});
$event.stopPropagation();
};
but failing to do so… am i missing something big here?
any help would be great, I’ve spent several days trying multiple plugins and various trouble shooting methods with no luck.