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

RadDatePicker +BackColor

6 Answers 197 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Bruce Hochstetler
Top achievements
Rank 2
Bruce Hochstetler asked on 17 Jul 2008, 10:34 PM
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

6 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 21 Jul 2008, 11:47 AM
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
0
Bruce Hochstetler
Top achievements
Rank 2
answered on 21 Jul 2008, 06:08 PM
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
0
Konstantin Petkov
Telerik team
answered on 22 Jul 2008, 02:55 PM
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
0
Bruce Hochstetler
Top achievements
Rank 2
answered on 22 Jul 2008, 03:39 PM
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
0
Doug
Top achievements
Rank 1
answered on 04 Sep 2013, 08:21 PM
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
0
Shinu
Top achievements
Rank 1
answered on 05 Sep 2013, 03:05 AM
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.
Tags
Calendar
Asked by
Bruce Hochstetler
Top achievements
Rank 2
Answers by
Konstantin Petkov
Telerik team
Bruce Hochstetler
Top achievements
Rank 2
Doug
Top achievements
Rank 1
Shinu
Top achievements
Rank 1
Share this question
or