cordova-plugin-datepicker icon indicating copy to clipboard operation
cordova-plugin-datepicker copied to clipboard

Format parameter

Open MattiaPrimavera opened this issue 7 years ago • 2 comments

Does the plugin provide a date format parameter ? Like 'dd MM yyyy'?

MattiaPrimavera avatar May 31 '17 09:05 MattiaPrimavera

This is a very important thing, which i couldn't find , is there any format parameter then?

himalayaahuja avatar May 19 '18 12:05 himalayaahuja

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.

subhomoy92 avatar May 25 '19 07:05 subhomoy92