I 've been trying to change the colors of some day on a datepicker, and after some testing I'm now able to do so, but there is a problem that I can't understand, on the BeforeShowDay events I have this code :
- Code: Select all
function (date){
alert(date);
alert(date.getMonth());
}
and the months in this 2 dates alert's are diferentes for example my current date is Mars then the first alert give my the full correct date, but the second alert give me the number 2=february,
so basicly when i do some more code to mark some days with other colors, the current month is never filled with the styles I want , but only the next one.
you can try this sample for make all the day in april with some style, what I get is the days in May marked.
- Code: Select all
if (date.getMonth()==4)
{
return [true,'busyDay'];
}
else
{
return [true,'normalDay'];
}
Regards
José Morango