¡@

Home 

2014/10/16 ¤W¤È 12:02:05

jquery Programming Glossary: availabledates

jQuery UI Datepicker enable only specific days in array

http://stackoverflow.com/questions/7709320/jquery-ui-datepicker-enable-only-specific-days-in-array

jsfiddle.net peter yXMKC the problem is only May 14th shows up as enabled. The others are all disabled. Any ideas var availableDates 9 5 2011 14 5 2011 15 5 2011 function available date dmy date.getDate date.getMonth 1 date.getFullYear if .inArray dmy availableDates.. 9 5 2011 14 5 2011 15 5 2011 function available date dmy date.getDate date.getMonth 1 date.getFullYear if .inArray dmy availableDates 1 return true Available else return false unAvailable '#date' .datepicker beforeShowDay available jquery jquery ui datepicker.. '#date' .datepicker beforeShowDay available jquery jquery ui datepicker share improve this question .inArray dmy availableDates returns the index of the element so when you compare with 1 only 14 5 2011 will match. Check for not equal to 1. Should..