I created an date array using this:
var holidays = ["7/24/2010","7/25/2010"];
var holidaysArray = jQuery.makeArray(holidays);
and then testing to see if myDate (a date object) exists in the array:
if ($.inArray(myDate, holidaysArray ) == -1) {....}
However the test always return -1 even though myDate is one of the two days. I was trying to avoid using date strings to do the test.
How can I use inArray function with date objects and array of date objects? (I am not sure if holidaysArray is actually an array of date objects and maybe that's why the test is failing.)
jQuery.makeArray()whenholidaysis already an actual Array.argumentsvariable inside a function)