Question

Where i need to change in the below code to change date format for datetimepicker in the following javascript:

http://www.google.com/codesearch#ak3vw-ODLck/packages/jQuery.UI.Combined.1.8.11/Content/Scripts/jquery-ui-1.8.11.js&q=jquery-ui-1.8.11.js&type=cs

Curently its show as dd/mm/yyyy hh:mm:ss

But i want it to be dd/mm/yyyy

No correct solution

OTHER TIPS

Rather than changing in JQuery lib you can set the format while you call the datetimepicker control.

var date = $('#datepicker').datepicker({ dateFormat: 'dd/mm/yyyy' });

If at all you want to do it in lib only then See this line to change

dateFormat: 'mm/dd/yy', // See format options on parseDate

You need to set this value to whatever you want. i.e. dateFormat: 'dd/mm/yyyy'

Description

You can change the date format in the standard jQuery UI DatePicker using the option dateformat.

You dont need to change the plugin.

Sample

$( "#MyDatePicker" ).datepicker({ dateFormat: 'dd/mm/yyyy' });

More Information

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top