Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Datetime picker Date format Issue

I am using jquery datetime picker. it is showing date in "yy/MMM/dd hh:mm:ss" format on selecting the date and time. i am not able to change its format. How can i change it to my custom format "dd/MM/yyyy hh:mm"

like image 284
Tassadaque Avatar asked Dec 05 '25 20:12

Tassadaque


1 Answers

You can set it at initialization like this:

$([selector]).datepicker({
    dateFormat: "dd/MM/yyy hh:mm"
});

Or you can set the date format after initialization using the following code:

$( ".selector" ).datepicker( "option", "dateFormat", 'yy-mm-dd' );

like image 117
Emil Badh Avatar answered Dec 08 '25 10:12

Emil Badh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!