Hey, that works! Thank you very much!!! Just to help other people, I'll put here my example of code:
<html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="jquery-1.3.2.js"> </script> <script type="text/javascript" src="ui.core.js"> </script> <script type="text/javascript" src="ui.datepicker.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#datepicker").datepicker({ minDate:'0', maxDate: '+2Y', dateFormat: 'dd/mm/yy', beforeShowDay: disableDays }); }); var disDays = ["22/9/2009", "23/9/2009", "5/10/2009", "8/10/2009", "9/2/2010"]; function disableDays(date) { var sDate = date.getDate().toString() + "/" + (date.getMonth() +1).toString() + "/" + date.getFullYear().toString(); //alert(sDate); if ($.inArray(sDate, disDays) != -1) return [true]; else return [false]; } </script> '<!--<script type="text/javascript"> $(function() { $("#datepicker").datepicker({ beforeShowDay: ["9/20/2009"] }); }); </script> --> </head> <body style="font-size:62.5%;"> <div class="demo"> <p>Date: <input id="datepicker" type="text"></p> </div><!-- End demo --> </body> </html> I hope that helps somebody else! On Sep 20, 10:47 pm, Ca-Phun Ung <[email protected]> wrote: > Hey, try beforeShowDay: > > http://jqueryui.com/demos/datepicker/#event-beforeShowDay > > Here's an example of using beforeShowDay to highlight special days: > > http://jsbin.com/enaza/edit > > If the first item in the returned array is true the day is selectable, false > means it's non-selectable. > > On Mon, Sep 21, 2009 at 1:16 AM, Tiago TC <[email protected]> wrote: > > > I have a JSP page with a calendar on it (datepicker). I need to > > display one different calendar for each user. > > > For each user, I have the days that user can choose. I would like to > > know how do I put those days on the datepicker so just those days can > > be selectables. > > > Thank you in advance! (I'm sorry about my English) > > -- > Ca-Phun Ung > +http://yelotofu.com > + hongkong, zce, jquery, jqueryui, php, css, html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
