alexcr
alexcr

Reputation: 181

datepicker won't change date format

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

Answers (1)

MarkRobbo
MarkRobbo

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

Related Questions