default date is not getting set
Hi,
I am using this code to set the default date of the datepicker to 7 days from today but it's not working and I am getting the datepicker blank.
what's wrong with the code please?
- <script type="text/javascript">
- $(function ()
- {
- $("#dateClosingDate").datepicker({ dateFormat: "dd-mm-yy",
- numberOfMonths: 2,
- changeMonth: true,
- changeYear: true,
- minDate: +1,
- maxDate: "+90D",
- setDate: 1,
- showOn: "button",
- buttonImage: "http://www.mywebsite.com/images/calendar.gif",
- buttonImageOnly: false })
-
- $("#dateClosingDate").datepicker( "option", "defaultDate", +7 );
- });