It appears that this is happening because the style specified in the
beforeShowDay function is being applied to the TD element for the
particular day. However, there is also an A element inside that TD
that has the default class. This A element is overlapping the class
that you have just added to the parent TD.
I would consider this a bug. Perhaps this has been corrected in 1.8.
I have not investigated. Can you enter a ticket for it?
In the meantime, a hack workaround would be to add a class that
suppresses the child A element. Something like this should work:
table.ui-datepicker-calendar td.ui-state-active a{ background:
transparent; border: 0; }
which assumes the class that you are adding in the beforeShowDay is ui-
state-active.
Hth,
Dave
On Dec 6, 9:45 am, Tanveer Virani <[email protected]> wrote:
> No, I have not solved it yet.
>
> Tanveer Virani
>
> On Dec 6, 2009, at 6:14 AM, Javier <[email protected]> wrote:
>
> > did you solved this , i am very interested in something similar, i
> > want to change the background - color of a range of dates example
> > dates for summer from 21 jun to 21 sep .
> > anyhelp will be welcome
>
> > On 20 nov, 20:48, Tanveer <[email protected]> wrote:
> >> I'm try to high light a select date ranges by using the beforeShowDay
> >> callback.
>
> >> Here is my code:
> >> $(function() {
> >> $("#staticCalendar").datepicker({
> >> beforeShowDay: function(date) {
> >> var curDay = date.getTime();
> >> if (1258268400000 <= curDay && 1258873199999 >= curDay) {
> >> return new Array(true, "ui-state-active", date.getTime());
> >> }
> >> return new Array(true, "", date.getTime());
> >> }});
>
> >> $.datepicker.setDefaults({showOtherMonths: true, dateFormat: 'mm/dd/
> >> yy', changeMonth: true, changeYear: true});
>
> >> In this case, the daterange(Nov 15, 2009 to Nov 21, 2009 MST) only
> >> has the border definition from the ui-state-active class, but not the
> >> back ground.
>
> >> Any help in getting all of the day highlight with the active
> >> background class would be greatly appreciated.
>
> >> Thanks,
> >> Tanveer
>
> > --
>
> > 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
> > athttp://groups.google.com/group/jquery-ui?hl=en
> > .
--
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.