cordova-plugin-datepicker
cordova-plugin-datepicker copied to clipboard
Format parameter
Does the plugin provide a date format parameter ? Like 'dd MM yyyy'?
This is a very important thing, which i couldn't find , is there any format parameter then?
I've found another way to format the date. Like I need the date format to be like "25-May-2019 12:00:00
so i've changed the onSuccess function a bit to fit my needs
`datePicker.show(options, onSuccess, onError);
function onSuccess(date) {
date = date.toString();
var sp = date.split(" ");
$('#'+id).val(sp[2]+'-'+sp[1]+'-'+sp[3]+' '+sp[4]);
}
function onError(error) { // Android only alert('Error: ' + error); }}`
I know its not the correct way but still fits my need.