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

[Solved] Rad DatePicker - Non Javascript Client

5 Answers 179 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
David Roberts
Top achievements
Rank 1
David Roberts asked on 17 Mar 2009, 12:43 PM
Hi,

We are currently using the RadDatePicker from the ASp.Net Q1 2009 release and we have found an issue that a very small number of clients who will access the site may have JavaScript turned off / disabled.

We have found an issue that even if the user types the date into the box the control does not register the fact. Is there any way to access the information inputted by the user?

Thank you

Dave

5 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 20 Mar 2009, 10:36 AM
Hi David,

Do you mean that you cannot type into the DateInput at all? Can you reproduce this on any of our online examples?

All the best,
Pavel
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
David Roberts
Top achievements
Rank 1
answered on 20 Mar 2009, 10:55 AM
Hi Pavel,

Thanks for getting back to me.

I've given the online example a try and with JavaScript enabled I typed a date (in my case "03/03/2009") into the first input box (next to the calendar control), and then clicked the "Move to next day" and everything worked perfectly.

When I disabled JavaScript typed in the same data and clicked the "Move to next day" I got no output.

Thank you

Dave
0
Pavel
Telerik team
answered on 20 Mar 2009, 12:37 PM
Hello David,

The button is executing javascript to modify the value of the Input. It cannot work if you disable the javascript execution from the browser. Also you cannot expect the DateInput to parse its values in that case. It will behave as a simple textbox, and you should still be able to type in it.

Sincerely yours,
Pavel
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
David Roberts
Top achievements
Rank 1
answered on 08 Apr 2009, 01:15 PM
Hi Pavel,

I have created a simple form, which has a standard button to post back, but even then I am unable to obtain the value, which a user typed in when JavaScript is disabled on the client.

Is there another way to obtain the value?

If you try the example, you can see that when a page is loaded without JavaScript enabled, the control allows the user to input a date, but when the button is pressed and the page is posted back, the value entered is not available.

Thank you

Dave

--Start HTML--

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AJAXEnabledWebApplication1._Default" %>

 

<%

@ 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">

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server" />

 

 

<div>

 

 

<telerik:RadDatePicker ID="RadDatePicker1" runat="server">

 

 

</telerik:RadDatePicker>

 

 

<br />

 

 

<asp:Button ID="btnDateCheck" runat="server" Text="Check Date" OnClick="btnDateCheck_Click" />

 

 

<br />

 

 

<asp:Label ID="lblDateOutput" runat="server" Text=""></asp:Label></div>

 

 

</form>

 

</

body>

--End HTML--

--Start Code Behind--

 

 

protected void btnDateCheck_Click(object sender, EventArgs e)

 

{

 

if (RadDatePicker1.SelectedDate.HasValue)

 

{

lblDateOutput.Text =

"Control Has Value Which Is:" + RadDatePicker1.SelectedDate.ToString();

 

}

 

else

 

 

 

{

lblDateOutput.Text =

"Control has no value";

 

}

}

 

--End Code Behind--

 

0
Accepted
Pavel
Telerik team
answered on 10 Apr 2009, 11:02 AM
Hi David,

Thank you for the markup/code. You cannot get the text with the SelectedDate property of the picker since it cannot be set properly on the client with disabled javascript. Instead I can suggest you to access the text of the DateInput with the following code:
Request[RadDatePicker1.DateInput.ClientID + "_text"

All the best,
Pavel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
David Roberts
Top achievements
Rank 1
Answers by
Pavel
Telerik team
David Roberts
Top achievements
Rank 1
Share this question
or