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

RadInputManager DisplayDateFormat not applied after AJAX postback

3 Answers 103 Views
Input
This is a migrated thread and some comments may be shown as answers.
ADH
Top achievements
Rank 1
ADH asked on 19 Jan 2009, 07:12 PM
I end up with the date and time in a textbox which is supposed to contain only the date. To reproduce this problem, the following code is handy - hit submit and the time will appear in the textboxes, and will vanish when the user clicks each textbox. I should note that this is using the latest version of RadControls as of this date, 2008.3.1314.20.

<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Test1.aspx.cs" Inherits="Testing.Test1" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
   <title>Untitled Page</title> 
</head> 
<body> 
   <form id="form1" runat="server">  
      <div> 
         <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
         </telerik:RadScriptManager> 
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
         </telerik:RadAjaxManager> 
         <asp:TextBox ID="TextBox1" runat="server" /><br /> 
         <asp:TextBox ID="TextBox2" runat="server" /><br /> 
         <asp:TextBox ID="TextBox3" runat="server" /><br /> 
         <asp:TextBox ID="TextBox4" runat="server" /><br /> 
         <asp:TextBox ID="TextBox5" runat="server" /><br /> 
         <telerik:RadInputManager ID="RadInputManager1" runat="server">  
            <telerik:DateInputSetting Culture="English (United States)" DateFormat="MM/dd/yyyy" 
               DisplayDateFormat="MM/dd/yyyy" SelectionOnFocus="SelectAll" MinDate="1920-01-01">  
               <TargetControls> 
                  <telerik:TargetInput ControlID="TextBox1" /> 
                  <telerik:TargetInput ControlID="TextBox2" /> 
                  <telerik:TargetInput ControlID="TextBox3" /> 
                  <telerik:TargetInput ControlID="TextBox4" /> 
                  <telerik:TargetInput ControlID="TextBox5" /> 
               </TargetControls> 
            </telerik:DateInputSetting> 
         </telerik:RadInputManager> 
         <input type="button" onclick="fnPostBack();" value="Submit" /> 
         <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">  
 
            <script type="text/javascript">  
               <!--  
                  function fnPostBack() {  
                     $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest("Test");  
                  }  
               //--> 
            </script> 
 
         </telerik:RadScriptBlock> 
      </div> 
   </form> 
</body> 
</html> 
 

And the code-behind:
using System;  
using System.Data;  
using System.Configuration;  
using System.Collections;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
 
namespace Testing  
{  
   public partial class Test1 : System.Web.UI.Page  
   {  
      protected void Page_Load(object sender, EventArgs e)  
      {  
         TextBox1.Text = DateTime.Now.ToString();  
         TextBox2.Text = DateTime.Now.ToString();  
         TextBox3.Text = DateTime.Now.ToString();  
         TextBox4.Text = DateTime.Now.ToString();  
         TextBox5.Text = DateTime.Now.ToString();  
      }  
   }  
}  
 

3 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 22 Jan 2009, 02:55 PM
Hello ADH,

Indeed I'm able to observed the described behavior. I have passed this to our developers for further investigation. Meanwhile you may consider temporary set the InputManager as updated control and set the input setting's InitializeOnClient to true.

Greetings,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
MARS-Carl
Top achievements
Rank 2
answered on 24 Sep 2009, 08:19 AM
Hi Telerik,

Is there any more progress on this thread, I am using build version 2009.1.527.35 and still experiencing this exact same problem.

Regards

Carl
0
Tsvetoslav
Telerik team
answered on 29 Sep 2009, 03:11 PM
Hello Carl,

The problem has been fixed and will be available in the latest internal build which you can download from your customer's account. Excuse us for having missed out of sight this issue for such a long time.

Thanks for the understanding.

Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Input
Asked by
ADH
Top achievements
Rank 1
Answers by
Rosen
Telerik team
MARS-Carl
Top achievements
Rank 2
Tsvetoslav
Telerik team
Share this question
or