views:

811

answers:

3

I am using beforeShowDay and have assined the class specialDay to particular days in my calendar this works fine, however i am having trouble understanding how to style the class and how the css from theme roller is working in general. I have tried:

td .specialDate { background: #33CC66; }

but this has no affect on the look of the calendar, any ideas?

A: 

Whenever i'm using the JQuery UI stuff I use Firebug to check out any styles being applied to particular elements, this will enable you to easily identify which CSS elements you need to play with.

Fermin
I use firebug, Ithink that the current style is being applied from the default theme roller css:.ui-state-default, .ui-widget-content .ui-state-default {-moz-background-clip:border;-moz-background-inline-policy:continuous;-moz-background-origin:padding;background:#75C8FF url(images/ui-bg_glass_75_75C8FF_1x400.png) repeat-x scroll 50% 50%;border:1px solid #3A9EE0;color:#555555;font-weight:normal;outline-color:-moz-use-text-color;outline-style:none;outline-width:medium;My question is then, how do I modify cells with the class .specialDay that already have the above applied to it?
Adam
+3  A: 

I had the same problem, fortunately i found the answer. When you disable a day (set to "false") is valid to assign a class (".specialDate") to change the background color, but not if the date is enabled, because we have another styled anchor ("a") that overrides the class assigned to "td" anchor.

So, if your date is enabled to select and want to change the styles, you have to edit the inherited "a" anchor, like this:

.specialDate a { background: #33CC66 !important; }

It's very important that you add the "!important" (if you'll forgive the repetition) indication in order to override other settings.

Hope this can help!

Mariano
A: 
.specialDate span {background-color:#ff0000!important;}

if you want to disable transparency effect

.specialDate {filter:Alpha(Opacity=100)!important; opacity: 1!important}
Barbaros Alp