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

[Solved] RadDateTimePicker style

2 Answers 153 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Wilson Hu
Top achievements
Rank 1
Wilson Hu asked on 07 Apr 2009, 02:51 AM
I use the RadDateTimePicker to input date/time. The RadDateTimePicker generate this following HTML:

<div id="RadTimePicker1_timeView_wrapper" style="">
    <div id="RadTimePicker1_timeView">
        <table id="RadTimePicker1_timeView_tdl" class="radTimeTableCss_Default" cellspacing="0" border="0" >
            ... time picker code here ...
        </table>
    </div>
</div>

Is there a way i can set a css class to the RadTimePicker1_timeView_wrapper or RadTimePicker1_timeView div?



2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Apr 2009, 07:38 AM
Hello Wilson,

You can set the Css class for the TimeView as shown below:
aspx:
<telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server"
        <TimeView runat="server" CssClass="timeviewCss"
          .... 
        </TimeView> 
</telerik:RadDateTimePicker> 

C#:
 <style type="text/css">    
   .timeviewCss a 
   { 
      
    color:Purple  !important; 
    background-color:Pink; 
   } 
 </style> 

Thanks
Princy.
0
Wilson Hu
Top achievements
Rank 1
answered on 07 Apr 2009, 07:59 AM
Hi Princy,

thanks for the quick reply. I've tried that but its not exactly what i want.

<telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server"
        <TimeView runat="server" CssClass="timeviewCss"
          .... 
        </TimeView> 
</telerik:RadDateTimePicker> 

The code above would add the css class to the <table> markup but what i want is to add an extra css class to the parent div (highlighted red below) of that <table> so I can do some extra style like padding ... (as you know IE doesnt support padding in the table)

<div ID="RadTimePicker1_timeView_wrapper" style="">
    <div ID="RadTimePicker1_timeView">
        <table id="RadTimePicker1_timeView_tdl" class="radTimeTableCss_Default timeviewCss" cellspacing="0" border="0" >
            ... time picker code here ...
        </table>
    </div>
</div>
Tags
Calendar
Asked by
Wilson Hu
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Wilson Hu
Top achievements
Rank 1
Share this question
or