View Full Version : Help required with this datepicker

12-15-2006, 03:44 PM
Well I am in some serious trouble and really need your help. Please have a look at this datepicker

Can you help me please can you give write me a piece of code through which always the 15 of the next month (of current date) is colored lets say red and when I click on it it gives an alert saying...."not available"??????
Remember if its 10 january then 15 feb must be colored and have the alert......

Can you please please please do it for me....I will be very thankful as I dont have any deep knowledge of it....

I hope that you can help me as I am really desperate and need it quick.....

Thanks in advance
Waiting for your reply. Thanks.

Best Regards,
A lot worried Adeel Abbas.

12-15-2006, 06:00 PM
Please Help me someone............

12-15-2006, 07:07 PM
Well since I was curious about the code I did look at it. So although I don't have time to alter it for you (and since you'll likely want more alterations next), I'll give you pointers to what I figured out.

Two changes would be necessary that I can see.

The first is near line 240ish.

if ( isNaN( n ) || n <= 0 || n == null )

if (n == 15) {
alert("not available");

d.setDate( n );
dp.setDate( d );

the next is near line 440ish.

if ( ( tmpDate.getDay() + 6 ) % 7 == this._redWeekDay ) // ISO
cells[currentWeek][colIndex].className += "red";
else if ( tmpDate.getDate() == 15 )
cells[currentWeek][colIndex].className += "red";

cells[currentWeek][colIndex].text =
this._matrix[currentWeek][colIndex] = tmpDate.getDate();

Hopefully that helps some. Good luck with it.


12-15-2006, 10:28 PM
Thanks David thanks a lot.....it was not perfect but it gave me the hint what to do........you are great man.....you rock........Thanks a lot buddy you are a genious ...i wasnt able to catch it and it would had taken years if I had no help.
:thumbsup: :) :thumbsup: