2 posts, 1 answers
  1. Tash
    Tash avatar
    15 posts
    Member since:
    Jul 2012

    Posted 01 May 2012 Link to this post

    I find that in the raddatepicker if you manually type in the date and try to access what is in the object I get 01/01/0001 instead of what was typed in. Is there some setting to set to manual typing is allowed?
  2. Answer
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 02 May 2012 Link to this post


    You did not specify if you are accessing the typed in value on the client or in code behind.

    Here's a simple sample to assist with client-side accessing of a value that is typed into the DateInput TextBox of the RadDatePicker ujsing JavaScript:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <%--Needed for JavaScript IntelliSense in VS2010--%>
                <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        <script type="text/javascript">
            function DisplayDateInputDate(sender, args) {
                var date = sender.get_selectedDate();
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <telerik:RadDatePicker ID="rdpMinDate" runat="server" Width="140px" AutoPostBack="true"
                DateInput-EmptyMessage="MinDate" MinDate="01/01/1000" MaxDate="01/01/3000" DateInput-ClientEvents-OnValueChanged="DisplayDateInputDate">
            <asp:Label ID="Label1" runat="server" Text=""></asp:Label>

    And to access the value in server-side code:

    using Telerik.Web.UI;
    public partial class Default : System.Web.UI.Page
        protected void rdpMinDate_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
            Label1.Text = "You selected: " + e.NewDate.Value.ToShortDateString();

    See this in action at http://screencast.com/t/WQJ3ZMRNaGX

    Hope this helps!
  3. DevCraft R3 2016 release webinar banner
Back to Top