So I have what I think is a pretty basic question but I cant for the life of me figure it out. How do you reference the selected date element (dom) once clicked. I have tried this:
$("#eventCalendar").datepicker({
onSelect: function(dateText,inst){
var activeDateObj = $("#eventCalendar").find('.ui-state-active');
}
});
This returns an object but I think it references the previously selected element; as in the class has not yet been applied to the new element. I'm really surprised the inst object doesn't contain some reference to the clicked element. I got this method to work by wrapping a quick timeout around the variable declaration but this is pretty dirty and I want to know if there is a better way. Thanks in advance.