RadDatePicker +BackColor

7 posts, 0 answers
  1. Bruce Hochstetler
    Bruce Hochstetler avatar
    155 posts
    Member since:
    Apr 2007

    Posted 17 Jul 2008 Link to this post

    Hi,

    I have a page that when initially loaded all components on it are disabled. When the components are enabled I switch the background color to yellow and outline the boxes in blue. No problem so far. On the RadDatePicker, I change the color by doing this: datePicker.DateInput.BackColor = Color.FromName("#FFFFC0"). When I gain focus on the dateinput textbox, the textbox changes the background color to white (or transparent - not sure) and clears the border. How do I maintain the color and border?

    BTW, this is also happening in a RadDateInput component.

    Thanks,
    Bruce
  2. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 21 Jul 2008 Link to this post

    Hello Bruce,

    You can control the RadDateInput focused style through the FocusedStyle property, which BackColor can be reset as well. You can find more about the different types of styles in the Input controls on the live demos site here:

    http://www.telerik.com/DEMOS/ASPNET/Prometheus/Input/Examples/Appearance/Styles/DefaultCS.aspx

    All the best,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bruce Hochstetler
    Bruce Hochstetler avatar
    155 posts
    Member since:
    Apr 2007

    Posted 21 Jul 2008 Link to this post

    Hi Konstantin,

    Well the FocusStyle only partially solved the problem. I also had to set the HoverStyle. I still have the issue of the border color. I've tried setting the Focus and Hover style's background color to blue, but once I move the cursor into the input box or click in it, the border disappears. I also tried the EnabledStyle with no luck. Is there another property I need to set for the border color?

    Thanks,
    Bruce
  5. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 22 Jul 2008 Link to this post

    Hi Bruce,

    No, there is no property of the control for the border itself and it should not disappear. This smells like an old issue of the input.

    I tried something like that with an older versions of Telerik.Web.UI since I'm testing with the latest pre-release build generally but could not reproduce it unfortunately. Can you please post a sample code which replicates that? Would you also try if you get that both in IE or Firefox for example? I guess you get it on IE only, don't you?

    Best wishes,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Bruce Hochstetler
    Bruce Hochstetler avatar
    155 posts
    Member since:
    Apr 2007

    Posted 22 Jul 2008 Link to this post

    Hi Konstantin,

    I have the same problem with firefox (v3). I will put together a small sample and open a support ticket. Also I'll check some of my css style settings, something may be messing with it.

    Thanks,
    Bruce
  7. Doug
    Doug avatar
    4 posts
    Member since:
    Jul 2013

    Posted 04 Sep 2013 Link to this post

    Hi - 
      
    When I set background color on a RadDatePicker, the background of the box itself does not change, but what's behind the box and the calendar changes. 
      
    I want to opposite - I want only the box containing the text date to be whatever color. 
      
    Thanks
  8. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Sep 2013 Link to this post

    Hi Doug,

    Please try the following CSS to set the background color of RadDatePicker.

    CSS:
    <style type="text/css">
        .riSingle .riTextBox
        {
            color: blue !important;
            background-color: cornsilk !important;
        }
    </style>

    Thanks,
    Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017