JQuery Datepicker display date format

28 Views Asked by At

I have a working version of jQuery datepicker which is defaulted to today's date and display in below format,

enter image description here

I needed to format the display date like below. How can I do it?

enter image description here

Here is the JS code

viewDate = function () {
            $('#Date').datepicker({
                changeMonth: true,
                changeYear: true,
                showButtonPanel: true,
                dateFormat: "yy-mm-dd",
                minDate:"-5y",
                maxDate: 'today',
                onSelect: function(selected,evnt) {
                    doSomething(selected);
                }
            }).datepicker("setDate", "0");
        },

Thanks for your help!

0

There are 0 best solutions below