javascript - jQuery UI DatePicker displaying wrong date -


i've got jquery ui datepicker following parameters:

changemonth: true, changeyear: true, yearrange: "-16:-1", dateformat: 'dd-mm-yy' 

it correctly displays years 1996 till 2011. however, when select date first time, it's strangely displayed 08-03-2012. 2012 not option selection in datepicker, date produced in text box.

if select date once again, it's correctly displayed - occurs first time.

any ideas?

you can set default date in range this:

<script type="text/javascript"> $(function() {                    $("#birthdate" ).datepicker({         changemonth: true,         changeyear: true,         yearrange: "-16:-1",         dateformat: 'dd-mm-yy',         defaultdate: '01-01-1996'     }); }); </script> 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -