RadDatePicker - Bizarre skins problem

2 posts, 0 answers
  1. Brad
    Brad avatar
    93 posts
    Member since:
    Jan 2011

    Posted 09 Oct 2011 Link to this post


    I have encountered a very strange problem applying a custom skin to a group of RadDatePickers.

    Here is my mark up that causes the error.

    <body>
        <form id="form1" runat="server">
            <div>
                <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                <table>
                    <tr>
                        <td><telerik:RadDatePicker ID="RadDatePicker1" runat="server" Width="100" Skin="CKCRadSkin" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"></telerik:RadDatePicker></td>
                        <td><telerik:RadDatePicker ID="RadDatePicker2" runat="server" Width="100" Skin="CKCRadSkin" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"></telerik:RadDatePicker></td>
                        <td><telerik:RadDatePicker ID="RadDatePicker3" runat="server" Width="100" Skin="CKCRadSkin" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"></telerik:RadDatePicker></td>
                        <td><telerik:RadDatePicker ID="RadDatePicker4" runat="server" Width="100" Skin="CKCRadSkin" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"></telerik:RadDatePicker></td>
                    </tr>
                </table>
            </div>
        </form>
    </body>

    Looks simple enough but does not render correctly

    Error

    What is bizarre about this error, is that if I remove the skin related code from ANY ONE of the controls, they all work correctly again.

    In this example I have removed the code from the second RadDatePicker.

    <body>
        <form id="form1" runat="server">
            <div>
                <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                <table>
                    <tr>
                        <td><telerik:RadDatePicker ID="RadDatePicker1" runat="server" Width="100" Skin="CKCRadSkin" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"></telerik:RadDatePicker></td>
                        <td><telerik:RadDatePicker ID="RadDatePicker2" runat="server" Width="100"></telerik:RadDatePicker></td>
                        <td><telerik:RadDatePicker ID="RadDatePicker3" runat="server" Width="100" Skin="CKCRadSkin" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"></telerik:RadDatePicker></td>
                        <td><telerik:RadDatePicker ID="RadDatePicker4" runat="server" Width="100" Skin="CKCRadSkin" EnableEmbeddedBaseStylesheet="false" EnableEmbeddedSkins="false"></telerik:RadDatePicker></td>
                    </tr>
                </table>
            </div>
        </form>
    </body>

    Running this code results in this image

    Image 2

    LIke I said above, I can remove that skins code from any one of the rows, and they will all work again.

    This is one of the more bizarre errors I have seen in ages. Is this a bug of the RadDatePicker?. Is there another way to apply the skins that might not result in the error?



  2. Galin
    Admin
    Galin avatar
    526 posts

    Posted 12 Oct 2011 Link to this post

    Hello Brad,

    Even you use custom skins you need a base stylesheets, therefore you have to set EnableEmbeddedBaseStylesheet property to true or include the necessary styles.

    I hope this helps.

    Best wishes,
    Galin
    the Telerik team
    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 their blog feed now
Back to Top