Reputation: 181
I'm trying to change the date format for my datepicker, but it doesn't want to change, here is my code:
$(document).ready(function() {
$('#dateselect').datepicker({
format: 'dd/mm/yyyy',
onSelect : function (dateText, inst) {
$('#dateform').submit(); //
}});
});
even so, the format on the front end is still mm/dd/yyyy
Upvotes: 1
Views: 1205
Reputation: 1015
Assuming you are using the jQuery UI Datepicker widget, the way to change the date format is
dateFormat
and not
format
See http://api.jqueryui.com/datepicker/#option-dateFormat
Upvotes: 3