Using RadDateTimePicker Without a TABLE Wrapping the TextBox and Popup Buttons

Thread is closed for posting
1 posts, 1 answers
  1. Answer
    Telerik Admin
    Telerik Admin avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 01 Jul 2010 Link to this post


    RadControls for ASP .NET AJAX version

    2009.1. and later
    .NET version

    Visual Studio version

    programming language

    browser support

    all browsers supported by RadControls

    The following code snippet demonstrates how to use a RadDateTimePicker without a <table> wrapping the textbox and popup buttons. Such an HTML rendering may be required by developers that like to conform strictly to HTML/CSS standards and best practices.

    <%@ Page Language="C#" %> 
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
    <script runat="server"
    protected void PickerButtons_PreRender(object sender, EventArgs e) 
        (sender as Panel).CssClass = String.Format("RadPicker RadPicker_{0}", RadDateTimePicker1.Skin); 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    <html xmlns=""
    <head runat="server"
    <meta http-equiv="content-type" content="text/html;charset=utf-8" /> 
    <form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
    <telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server" style="float:left"
        <DatePopupButton Visible="false" /> 
        <TimePopupButton Visible="false" /> 
    <asp:Panel ID="PickerButtons" runat="server" OnPreRender="PickerButtons_PreRender" style="display:inline"
            <href="#" class="rcCalPopup" onclick="return showCal()" style="float:left">open Calendar popup</a> 
            <href="#" class="rcTimePopup" onclick="return showTime()" style="float:left">open TimeView popup</a> 
    <div style="clear:both"><!-- --></div
    <script type="text/javascript"
    function showCal() 
        $find("<%= RadDateTimePicker1.ClientID %>").showPopup(); 
        return false; 
    function showTime() 
        $find("<%= RadDateTimePicker1.ClientID %>").showTimePopup(); 
        return false; 
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.