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

Calendar.CssClass has no effect

3 Answers 59 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Laurens
Top achievements
Rank 1
Laurens asked on 09 Dec 2013, 10:24 AM
Hi,

I create my custom Telerik Skins with ASP.Net Themes. I have a .skin file resembling the snippet beneath. 

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<telerik:RadDatePicker runat="server" EnableEmbeddedSkins="false"
           CssClass="RadPicker_Laurens" SkinID="Laurens">
    <DateInput CssClass="RadInput_Laurens"
        DisabledStyle-CssClass="RadInput_Disabled_Laurens"
        EmptyMessageStyle-CssClass="RadInput_Empty_Laurens"
        EnabledStyle-CssClass="RadInput_Enabled_Laurens"
        FocusedStyle-CssClass="RadInput_Focused_Laurens"
        HoveredStyle-CssClass="RadInput_Hover_Laurens"
        InvalidStyle-CssClass="RadInput_Error_Laurens"
        ReadOnlyStyle-CssClass="RadInput_Read_Laurens">
    </DateInput>
    <Calendar CssClass="RadCalendar_Laurens">
    </Calendar>
</telerik:RadDatePicker>

The problem is that all the named cssClasses (except "RadPicker_Laurens") aren't loaded into the Html. I get a transperant looking calendar. With 'Developers Tools' I cannot find "RadCalender_Laurens".

Perhaps noteworthy: my Telerik version is 2011.2.915.40

3 Answers, 1 is accepted

Sort by
0
Laurens
Top achievements
Rank 1
answered on 11 Dec 2013, 11:13 AM
I´m able to set the Calendar css by
...
<Calendar >
    <ClientEvents OnLoad="function(sender, args){ sender.addCssClass('RadCalendar_Laurens'); }" />
</Calendar>
...
which isn´t a pretty solution at all, but it works.

A similar problem comes with the DateInput, 
this:
...
<DateInput CssClass="RadInput_Laurens" />
...
will generate in html the following:
...
<span ... class="RadInput RadInput_Default" ...>
    <input type="text" ... class="riTextBox riEnabled RadInput_Laurens" ... />
    ...
</span>
...
This seems rather incorrect, RadInput_Laurens should be next to RadInput_Default.

Any clues?
Thanks in advance.
0
Galin
Telerik team
answered on 12 Dec 2013, 10:06 AM
Hi Laurens,

The еаsiest way to achieve this behavior is to set the Skin to Laurens, e.g.
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" EnableEmbeddedSkins="false" Skin="Laurens" />

I hope this helps.

Regards,
Galin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Laurens
Top achievements
Rank 1
answered on 12 Dec 2013, 01:50 PM
I never thought that would work with themes, but it did however! 
All this trouble... Derp.
Anyway, thanks a lot!
Tags
Calendar
Asked by
Laurens
Top achievements
Rank 1
Answers by
Laurens
Top achievements
Rank 1
Galin
Telerik team
Share this question
or