Jquery datepicker format date not working

Here is my code:

$(function () {
    $("#datepicker").datepicker({ dateFormat: 'DD-MM-YY' });
});

And the datetime picker is shown, but in format mm/dd/yyyy. Why is it not working?

Answer

try out this

$(".datepicker").datepicker({dateFormat: 'dd-mm-yy'});

small letter will works

Leave a Reply

Your email address will not be published. Required fields are marked *