New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pickadate sending incorrect format #1089

Open
HawkWeb opened this Issue Jul 1, 2018 · 0 comments

Comments

1 participant
@HawkWeb

HawkWeb commented Jul 1, 2018

pickadate code occasionally sending incorrect Date and Time format.

eg.

Drop Off Date: 1 July

Drop Off Time: 00.01

Pick Up Date: 17th July

Pick Up Time: 16.00

Should be

Drop Off Date: 01-07-2018

Drop Off Time: 00.00

Pick Up Date: 17-07-2018

Pick Up Time: 16.00

This is the code...

$(document).ready(function() {
$('#DropOffDate').pickadate({
format: 'dd-mm-yyyy',
formatSubmit: 'dd-mm-yyyy',
hiddenName: true,
min: true,
clear: '',
today: '',
onStart: function ()
{
var date = new Date();
date.setDate(date.getDate() + 2);
this.set('select', [date.getFullYear(), date.getMonth() + 0, date.getDate()])
},
});
$('#DropOffTime').pickatime({
format: 'HH.i',
formatSubmit: 'HH.i',
clear: ''
});
$('#PickUpDate').pickadate({
format: 'dd-mm-yyyy',
formatSubmit: 'dd-mm-yyyy',
hiddenName: true,
min: true,
clear: '',
today: '',
onStart: function ()
{
var date = new Date();
date.setDate(date.getDate() + 5);
this.set('select', [date.getFullYear(), date.getMonth() + 0, date.getDate()])
},
});
$('#PickUpTime').pickatime({
format: 'HH.i',
formatSubmit: 'HH.i',
clear: ''
});

});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment