www.webdeveloper.com
Results 1 to 3 of 3

Thread: datepicker with SQL?

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    88

    datepicker with SQL?

    Hey Guys,

    Im having difficulty trying to work this out.

    Im trying to grey out the dates that have already been entered into the database.

    heres what I tried

    Code:
    **database stuff**
    
      $(document).ready(function() {
        $("#datepicker").datepicker({minDate: 0,
        
             beforeShowDay: booked
          });
     
          function booked(date){
              var day = date.getDay('$grey, $grey2');
                          return [(day > 0), ''];
          };
    });
    im new with this stuff so go easy

    Thanks

  2. #2
    Join Date
    Apr 2010
    Location
    Salem,Ma
    Posts
    623
    i was going to try and write a solution, but there is a darn good one already : http://davidwalsh.name/jquery-datepicker-disable-days

  3. #3
    Join Date
    Mar 2008
    Posts
    88
    Thanks for replying...

    I've tried to implement this into my code but Ive had no luck! I also tried using it on its own to see whether it worked without my code but it doesn't. (changing the dates etc)


    Also how would I change it to add values from my database?

    the strings with the data in are called $grey $grey2 (which have the dates in)

    Thanks again!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles