This is a migrated thread and some comments may be shown as answers.

DateInput.CSSClass not working

2 Answers 99 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Amendra
Top achievements
Rank 1
Amendra asked on 25 Feb 2009, 03:31 AM
Hi I am trying to changed the background color using CSS for the timepicker textbox.

If I use RadTimepicker.DateInput.BackColor = Color.Red; It works.

But if I use a css like RadTimepicker.DateInput.CssClass = "cssname"; it does not work. I have tried the css on other controls it does work so the css is fine.

Any thoughts on this.

Amendra

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Feb 2009, 06:28 AM
Hi Amendra,

Try using the !important modifier in CSS class. This is to force the new rule to override any more specific CSS rules for hovered items in the CSS file for the skin.  Without the !important modifier, the new CSS rule would not take effect. See example below.

CSS:
<style type="text/css"
.cssname 
    background-color: Red !important
}     
</style> 

CS:
RadTimepicker1.DateInput.CssClass = "cssname"

Thanks,
Shinu.
0
Suneco
Top achievements
Rank 2
answered on 19 Oct 2009, 03:25 PM
Hello Shinu,

This just want to let you know that this worked out for me!

Greetings,
Jeroen Speldekamp
Tags
Calendar
Asked by
Amendra
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Suneco
Top achievements
Rank 2
Share this question
or