jquery Date picker jquery to UK format

try this:

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

$.datepicker.formatDate( format, date, settings )

Format a date into a string value with a specified format.

The format can be combinations of the following:

d - day of month (no leading zero)
dd - day of month (two digit)
o - day of the year (no leading zeros)
oo - day of the year (three digit)
D - day name short
DD - day name long
m - month of year (no leading zero)
mm - month of year (two digit)
M - month name short
MM - month name long
y - year (two digit)
yy - year (four digit)
@ - Unix timestamp (ms since 01/01/1970)
! - Windows ticks (100ns since 01/01/0001)
'...' - literal text
'' - single quote
anything else - literal text

Use one of the following

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

$('#datepicker').datepicker({ dateFormat: 'dd/mm/yy' });

$('#datepicker').datepicker({ dateFormat: 'dd-M-yy' });

$('#datepicker').datepicker({ dateFormat: 'dd-MM-yy' });

Tags:

Jquery