If i create a control like this:
RadDatePicker date = new RadDatePicker(); date.EnableTyping = false; date.ShowPopupOnFocus = true;
Disabling typing also disables Popup.. ..but i only want the popup, that's why i disable typing! :D
So now i have a control that allows no input at all!
Disabling typing should actually force popup = true
Also, you should probably not show a caret in the input box when typing is disabled. Very misleading.
15 Answers, 1 is accepted
I tried same code and that got worked for me and the pop-up calendar is showing on clicking the image for the date-picker. I am using RadControls version 2010, 3, 1109, 35. If you want to show calendar popup when clicking the input, then you can make use of the client side api (by calling showPopup method).
RadDatePicker Client Object
-Shinu.
If you read my code you'd see there's a Property for this exact purpose.
In your scenario I would suggest you to us the "ReadOnly" property of the controls instead of "EnableTyping". Give this a try and let me know how it goes.
All the best,
Maria Ilieva
the Telerik team
Find attached a sample runnable application which shows the correct functionality of both methods for preventing typing in DateInput. Test it on your aide and let me know what the difference in your case is.
All the best,
Maria Ilieva
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
Find attached a sample runnable application which shows the correct functionality of both methods for preventing typing in DateInput. Test it on your aide and let me know what the difference in your case is.
All the best,
Maria Ilieva
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
Do you have any solution to the particular problem, or shall I submit a support ticket for it?
Could you please let me know what exactly you mean by "still not working" ? Are you able to type in the input in the provided project. On my side the application works as expected.
Please let me know what version of Telerik RadControls are you using?
Greetings,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
I am testing at your demo project that you have provided, so I guess the RadControls are the latest version.
So about the problem:
I am not able to type in the input, but the property "ShowPopupOnFocus" should open the calendar when I select the datainput.
If the property of the RadDatePicker "EnableTyping" is set to true, the other property "ShowPopupOnFocus" is working as expected. In the other case nothing happens. I need to ensure that the users cannot type in the dateInput field but when they click on it the calendar should pop up.
In this case possible approach is to cancel the keypressing in the keydown event of the DateInput component. Please find attached a sample application which presents this functionality. Test it locally and verify if it covers your requirements.
Greetings,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
<telerik:RadDatePicker ID="ec_dtEndDate" runat="server" ShowPopupOnFocus="true" EnableTyping="False" />
I've also tried
<telerik:RadDatePicker ID="ec_dtEndDate" runat="server" ShowPopupOnFocus="true" DateInput-ReadOnly="true" />
Either way, the date pop-up does not appear when the text box gets focus. Also the zip you supplied with the possible solution seems to be corrupted -can you repost?
I'm referencing the 2011.3.1305.40 build in my project in Visual Studio.
Thanks,
BB
It seems that you have some problem downloading the project attached as on my end it appears to be correct. However here is the full code of the application:
JS:
<script type=
"text/javascript"
>
function
numericInput(e) {
e = e || window.event;
if
(e.preventDefault) e.preventDefault();
e.returnValue =
false
;
return
false
;
}
</script>
<
asp:Panel
ID
=
"Panel1"
runat
=
"server"
>
<
telerik:RadDatePicker
ID
=
"RadDatePicker1"
ShowPopupOnFocus
=
"true"
runat
=
"server"
>
<
DateInput
runat
=
"server"
>
</
DateInput
>
</
telerik:RadDatePicker
>
</
asp:Panel
>
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadDatePicker1.DateInput.Attributes.Add(
"onkeydown"
,
"numericInput(event);"
);
}
I hope this works for you.
Regards,
Maria Ilieva
the Telerik team
DatePicker1.DateInput.Attributes.Add("onfocus", "showthecalendar(event);")
Is this possible?
BB
Find attached the sample application you were previously unable to download.
I further tested it on my end and it seems to cover all your requirements. Test it on your end and let me know if this works for you.
All the best,
Maria Ilieva
the Telerik team