Well, I don't know if you just want to disable weekends or something
like that, but from the jquery ui documentation:
http://docs.jquery.com/UI/Datepicker/datepicker#options
There's a beforeShowDay function that you can use to specify specific
dates to show/not show.
"The function takes a date as a parameter and must return an array
with [0] equal to true/false indicating whether or not this date is
selectable and [1] equal to a CSS class name(s) or '' for the default
presentation. It is called for each day in the datepicker before is it
displayed."
"$(".selector").datepicker({ beforeShowDay: nationalDays})
natDays = [[1, 26, 'au'], [2, 6, 'nz'], [3, 17, 'ie'], [4, 27, 'za'],
[5, 25, 'ar'], [6, 6, 'se'], [7, 4, 'us'], [8, 17, 'id'], [9, 7,
'br'], [10, 1, 'cn'], [11, 22, 'lb'], [12, 12, 'ke']];
function nationalDays(date) {
for (i = 0; i < natDays.length; i++) {
if (date.getMonth() == natDays[i][0] - 1 && date.getDate() ==
natDays[i][1]) {
return [false, natDays[i][2] + '_day'];
}
}
return [true, ''];
}
"
And there's a built in one to disable weekends.
$(".selector").datepicker({ beforeShowDay: $.datepicker.noWeekends })
On Sep 4, 9:28 am, Snapshot <[EMAIL PROTECTED]> wrote:
> It's possible to disable/select by default class some days?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---