is there a way to have all the days of a month or of a year? I am looking for this in order to disable some specific days in a datepicker, i would have a page in the back-of
I'm not sure from your description if the standard disable dates datepicker will work with you, so I'll answer you question directly.
You can construct an array of days for a month fairly easily by doing this:
var numOfDays = new Date(2012, 10, 0).getDate(); //use 0 here and the actual month
var days = new Array();
//This will construct an array with all the elements represent the day of the week
//(i.e. Oct 30th would be days[30-1] or days[29]) and the value would be the actual
//day of the week (i.e. Tuesday which is representing by the number 2)
for(var i=0;i<=numOfDays;i++)
{
days[i] = new Date(2012,9,i+1).getDay(); //use month-1 here
}
//This will give you a number from 0 - 6 which represents (Sunday - Saturday)
alert(days[29]);
Using that array of days you can pretty much do whatever you want with it and know the day of the week as well.