DateInput.CSSClass not working

3 posts, 0 answers
  1. Amendra
    Amendra avatar
    10 posts
    Member since:
    Nov 2008

    Posted 24 Feb 2009 Link to this post

    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. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Feb 2009 Link to this post

    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.
  3. Jeroen Speldekamp
    Jeroen Speldekamp avatar
    30 posts
    Member since:
    Mar 2005

    Posted 19 Oct 2009 Link to this post

    Hello Shinu,

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

    Greetings,
    Jeroen Speldekamp
Back to Top