简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM