The validation appearance in DatePicker control

2 posts, 1 answers
  1. Udi
    Udi avatar
    36 posts
    Member since:
    Sep 2010

    Posted 26 Sep 2010 Link to this post

    Hello,

    May i control the default validation appearance?
    I mean, instead of the redbox and the yellow warning i want to change it to red exclamation mark.
    another question is : can i add a tooltip to the validation that explain the problem?

    Thanks,
    Oren
  2. Answer
    Dimo
    Admin
    Dimo avatar
    8472 posts

    Posted 29 Sep 2010 Link to this post

    Hi Oren,

    Please inspect the following demo:

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     
    <head runat="server">
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <title>RadControls</title>
    <style type="text/css">
     
    .myPicker .RadInput .riError
    {
        border-color:#666;
        background:transparent 96% center no-repeat url(http://confluence.atlassian.com/download/attachments/130482385/ExclamationMark.png);
    }
     
    </style>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
     
    <telerik:RadToolTip ID="RadToolTip1" runat="server" Text="server set message" Width="140px" ManualClose="true" Position="BottomRight" OffsetX="0" />
     
    <br /><br />
     
    <telerik:RadDatePicker ID="RadDatePicker1" runat="server" CssClass="myPicker">
        <DateInput runat="server">
            <ClientEvents OnError="showToolTip" />
        </DateInput>
    </telerik:RadDatePicker>
     
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
     
    function showToolTip(sender, args)
    {
        var rtt = $find("<%= RadToolTip1.ClientID %>");
        rtt.set_text("client set message");
        rtt.set_targetControlID(sender.get_id());
        rtt.show();
    }
     
    </script>
    </telerik:RadCodeBlock>
     
    </form>
    </body>
    </html>


    Regards,
    Dimo
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top