Mobiscroll date modal customisation

446 views Asked by At

Have a mobiscroll instance to show date:

        $(document).ready(function () {                               
                $("#date").mobiscroll().date({
                    theme: 'wp',
                    mode: 'clickpick',
                    onChange: function (ins) {
                        console.log(JSON.stringify(ins));
                    }
                });
            });

Currently the datepicker displayed in the format like: dd/mm/yyyy How can swap the order be to see mm/dd/yyyy ?

1

There are 1 answers

1
Zoltan Veres On
$(document).ready(function () {
    $("#date").mobiscroll().date({
        theme: 'wp',
        mode: 'clickpick',
        onChange: function (ins) {
            console.log(JSON.stringify(ins));
        },
        dateFormat: 'mm/dd/yyyy'
    });
});

Here's the link for more info:

https://docs.mobiscroll.com/3-1-0/jquery/datetime#!localization-dateFormat