Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help required with this datepicker

    Hi,
    Well I am in some serious trouble and really need your help. Please have a look at this datepicker
    http://webfx.eae.net/dhtml/datepicker/datepicker.html

    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.

  • #2
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Please Help me someone............

  • #3
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

    Code:
        if ( isNaN( n ) || n <= 0 || n == null )
          return;
        
        if (n == 15) {
          alert("not available");
          return;
        }
    
        d.setDate( n );
        dp.setDate( d );
    the next is near line 440ish.

    Code:
          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.

    david_kw

  • #4
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up Thanks David

    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •