Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 608
petko_stankoski Avatar asked Mar 27 '12 10:03

petko_stankoski


People also ask

How do I change date format in Datepicker?

An input element that is to be updated with the selected date from the datepicker. Use the altFormat option to change the format of the date within this field.

How do I change the date format from YYYY MM DD in jQuery?

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

How do I fix my Datepicker position?

To change the position of the jQuery UI Datepicker just modify . ui-datepicker in the css file. The size of the Datepicker can also be changed in this way, just adjust the font size.


1 Answers

Try just format option not dateFormat

$('#datepicker').datepicker({
   format: 'dd-mm-yyyy' 
});
like image 88
Mayur Kambariya Avatar answered Sep 28 '22 11:09

Mayur Kambariya