I found a great date time picker based on jQuery-ui http://trentrichardson.com/examples/timepicker/, but suddenly realized that i can't modify date format... Tried something like this:
jQuery('.datetimepicker').datetimepicker({
timeFormat: 'HH:mm'
}).formatDate('yy-mm-dd');
Can someone show an example on it?
You can use the code:
jQuery('.datetimepicker')
.datetimepicker({
dateFormat: 'yy-mm-dd',
timeFormat: 'HH:mm'
});
Try this:
This will set the date format to "yy-mm-dd"
$.datepicker._defaults.dateFormat = "yy-mm-dd";
Yes it is possible, have a look at the dateFormat
option in the API Documentation for the datepicker
This will work,
jQuery('.datetimepicker').datetimepicker({
timeFormat: 'HH:mm',
dateFormat: "yy-mm-dd"
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With