Hi there —

For my purposes, it would be very useful if datepicker had a set of
methods for adding, removing and checking for certain classes to/from/
on the element (the link in the table cell) that represents that
date.  Because all of the html for the calendar gets appended and
output every time there is a change in state, this would need to be an
internal behavior of datepicker, and could not be provided by another
plug-in.  By the way, if this makes no sense to you, consider that I
am using the plugin inline, not the popup calendar from an input.  I
may try to implement something that has a syntax like this as a hack
of the datepicker plugin:


$('div.some-element').datepicker();

var day = new Date();
day = day.setDate(day.getDate()+5);

$('div.some-element').datepicker('method', 'addClass', 'some-class',
day); //  the third argument is which "day" we're adding the class to.

$('div.some-element').datepicker('method', 'hasClass', 'some-class',
day); // true

$('div.some-element').datepicker('method', 'removeClass', 'some-
class', day);

$('div.some-element').datepicker('method', 'hasClass', 'some-class',
day); // false


See what I mean?

Thanks,
Chris

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to