Hi,
after the last update (2013.1.403.40) we noticed a changed behaviour on the RadDateTimePicker component. If the user does not tab out from the component or goes to another input field before he does a callback the SelectedDate is null.
I'm pasting in a test project
Best regards
Robert
ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="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">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
/>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<%--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"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
<
script
type
=
"text/javascript"
>
//Put your JavaScript code here.
</
script
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
</
telerik:RadAjaxManager
>
<
div
>
Instructions. Change time of the RadDateTimePicker component and press the TEST button.
</
div
>
<
div
>
<
telerik:RadDateTimePicker
ID
=
"rdtpTimeStamp"
runat
=
"server"
>
</
telerik:RadDateTimePicker
>
<
hr
/>
<
telerik:RadTabStrip
ID
=
"tsFunctionMenu"
runat
=
"server"
OnTabClick
=
"tsFunctionMenu_TabClick"
SkinID
=
"FunctionMenuSkin"
>
</
telerik:RadTabStrip
>
<
hr
/>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text
=
"..."
></
asp:Label
>
<
hr
/>
</
div
>
</
form
>
</
body
>
</
html
>
CS
using
System;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Data;
using
System.Configuration;
using
System.Web.Security;
using
System.Web.UI.WebControls.WebParts;
using
System.Web.UI.HtmlControls;
using
Telerik.Web.UI;
public
partial
class
Default : System.Web.UI.Page
{
protected
void
Page_Init(
object
sender, EventArgs e)
{
RadTab tab =
new
RadTab(
"TEST"
,
"TEST"
);
tsFunctionMenu.Tabs.Add(tab);
}
protected
void
Page_Load(
object
sender, EventArgs e)
{
Add(
"<hr>"
);
Add(
"Page_Load"
);
Add(String.Format(
"Date: {0}"
, rdtpTimeStamp.SelectedDate));
if
(!IsPostBack)
{
rdtpTimeStamp.SelectedDate = DateTime.Now;
}
}
protected
void
tsFunctionMenu_TabClick(
object
sender, RadTabStripEventArgs e)
{
RadTabStrip ts = (RadTabStrip)sender;
ts.SelectedIndex = -1;
string
cmd = e.Tab.Value;
Add(String.Format(
"TabClick: {0}"
, cmd));
}
protected
void
Add(
string
text)
{
Label1.Text +=
"<br>"
+ text;
}
protected
void
Add(
string
text,
object
o)
{
Add(String.Format(text, o));
}
}
14 Answers, 1 is accepted
This issue was fixed in the Service Pack, please upgrade and let us know if you have any problems.
Greetings,
Vasil
the Telerik team
Best Regards
Robert
If you need I can send you additional code to verify the behaviour (IE 10) but I think you must already be aware of this behaviour.
I see the problem here, and we will try to resolve in our future versions.
Currently as workarownd you can attach onclick of the TabStrip and to focus any other element of the page, that will trigger blur of your RadDateInput and the data will be submitted correctly.
Kind regards,
Vasil
the Telerik team
We upgraded to SP1 to get rid of a similar problem regarding RadTextBox on Windows Phone devices.
1) When do you estimate to have a fix for the problem?
2) Is the orginial Q1 2013 available for download and if so where can I do it?
2013-05-14 Update
I tried Teleriks suggestion to manually focus another element before doing the postback. I added java for the OnClientTabSelecting on my menu (a RadTabStrip) but this change did not solved the problem.
Please Telerik - can you give us a hint when you estimate to have a solution for the problem!
Best regards
Robert
1) When do you estimate to have a fix for the problem?
2) Is the orginial Q1 2013 available for download and if so where can I do it?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="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">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
telerik:RadStyleSheetManager
ID
=
"RadStyleSheetManager1"
runat
=
"server"
/>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function MyDummyFocus() {
var id = "<%=tbPrice.ClientID %>"
var cmp = $get(id);
cmp.focus();
cmp.blur();
}
</
script
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
<
Scripts
>
<%--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"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
<
script
type
=
"text/javascript"
>
//Put your JavaScript code here.
</
script
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
</
telerik:RadAjaxManager
>
<
div
>
Instructions. <
br
/>
1) Change time of the RadDateTimePicker component and press the TEST button.<
br
/>
2) Enter a decimal number (in swedish environment i entered "12,34")
</
div
>
<
div
>
<
telerik:RadDateTimePicker
ID
=
"rdtpTimeStamp"
runat
=
"server"
>
</
telerik:RadDateTimePicker
>
<
telerik:RadNumericTextBox
ID
=
"tbPrice"
runat
=
"server"
>
</
telerik:RadNumericTextBox
>
<
hr
/>
<
telerik:RadButton
ID
=
"RadButton1"
runat
=
"server"
onclick
=
"RadButton1_Click"
Text
=
"RadButton"
>
</
telerik:RadButton
>
<
telerik:RadTabStrip
ID
=
"tsFunctionMenu"
runat
=
"server"
OnTabClick
=
"tsFunctionMenu_TabClick"
OnClientMouseOver
=
"MyDummyFocus"
SkinID
=
"FunctionMenuSkin "
>
</
telerik:RadTabStrip
>
<
hr
/>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text
=
"..."
></
asp:Label
>
<
hr
/>
</
div
>
</
form
>
</
body
>
</
html
>
Please Telerik give us feedback on;
1) When do you estimate to have a fix for the problem?
2) Is the orginial Q1 2013 available for download and if so where can I do it?
Best regards
Robert
We reed all posts, don't need to repeat yourself. We will do anything possible to fix this for our upcoming Q2 2013 release.
About the download, I could not say in the forums, it depend on your license and so on. You can contact our sales department and they will help you to get the previous version.
Regards,
Vasil
the Telerik team
I used the GAC to restore the Telerik dll's and tried it with Q1 2013 (both original, SP1 and SP2) and recreated the error on all versions. The previous version that we used and where our pages behaved as predicted was in Q1 2011 (2011,3,1115,40).
To sum up the error:
Telerik version: Q1 2013
Browser where the problem is found: IE 9, IE 10, Firefox 19, Opera 12
Browser where the problem is NOT found: IE 6, IE 7, IE 8, Chrome 26,
Component: RadDateTimePicker and RadNumericTextBox
Description: Using the above components together with RadTabStrip (and perhaps other componts that uses callback) without first leaving the component results in data loss. For the RadDateTimePicker the date disappears and in the RadNumericTextBox the decimal point disappear.
Work around: Use the OnClientMouseOver event on the RadTabStrip (Telerik suggested the OnClick event which does not exists) and bluring the component
Now you have a detailed description of the error, let us hope that I get fix in Q2 2013
Kind regards
Robert
Thank you for bringing this problem to our attention. The problem will be forwarded to our developers who will fix it for the future releases. However, please note that we are not able to predict a strict deadline.
I have updated your Telerik points for bringing the problem to our attention. Sorry for any inconvenience caused.
Kind regards,
Eyup
the Telerik team
We allso noticed this bug in our application after upgrading from 2013.1.305.40 to SP1 . Since we trigger the postback using __doPostBack('rbSave', '') there's no momentum where we can switch focus.
Has this allready been fixed in a newer version ?
And what happens when your account has recently expired ?
We should have access to 2013.SP2, but that one (and SP1 aswell) brings in this bug which makes updating impossible...
Yours
We now have the work around in our code for three years. Yesterday we had another problem that arrises when we use the workaround to set focus on the DateTimePicker object and the blur it. If the control is not fully visible in the browser the focus() method will move the entire window causing the initial click on the TabStrip to fail.
Is there a reasoni that this problem is still not fixed?
Kind regards
Robert
It works correctly in the latest version (Q1 2016 SP1). Could you remove the workaround and test it?
If you continue to have problems, please give us more details about your current configuration.
Sample page would be helpful, as well as information if you are using Lightweight render mode or Classic. What is the version of .NET and your Browser.
Regards,
Vasil
Telerik
Thanks Vasil,
Updated the components from Q4 2015 to Q1 2016 solved the problem.
Thanks
Robert