Problem with days and months starting with 0
I have a JSP page who fill the variable "disableDays" below with dates.
- var disDays = [<%= datasPermitidasDeReserva %>];
However, the dates returned by the JSP can look like this:
02/09/2010, 11/02/2009 ...I figured out that the UI Date Picker doesn't work for months and days that starts with 0. In other words, if the dates above were written like this:
2/9/2009 and
11/2/2009 then it would work.
I'd like to know if there is something I can do directly into the Date Picker options so it can accept days and months that starts with 0.
Here is my code:
- <script type="text/javascript">
- $(document).ready(function(){
- $("#data1").datepicker({
- minDate: '0',
- maxDate: '+1Y',
- dateFormat: 'dd/mm/yy',
- beforeShowDay: disableDays,
- changeMonth: true
- });
- });
Thank you in advance.
PS: Sorry for my English.