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

RadDateInput different browsers,different behavior

3 Answers 15 Views
Input
This is a migrated thread and some comments may be shown as answers.
Elliott
Top achievements
Rank 2
Elliott asked on 03 Aug 2012, 07:10 PM
in IE, Safari and Chrome, the delete and backspace keys can be used to clear out data, especially bad data
in Firefox and Opera those keys are disabled
<telerik:RadDateInput id="del1" DateFormat="d" Width="92px" Height="18px" Font-Size="X-Small" Font-Names="Verdana" BorderWidth="1px" runat="server" >
    <ClientEvents OnKeyPress="del_keypress" />
    <ClientEvents OnError="date_input_error" />  
</telerik:RadDateInput>
the scripts
function del_keypress(sender, eventArgs) {
    var whichCode = eventArgs.get_keyCode();
    if ((whichCode != 13) && ((whichCode < 47) || (whichCode > 57)))
        eventArgs.set_cancel(true);
}
 
function date_input_error(sender,args) {
    alert("Invalid Delivery Date");
    sender.set_value('');
    sender.focus();
}

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 09 Aug 2012, 08:14 AM
Hi Marianne,

Please note that the mentioned functionalities are inbuilt and you could use Delete or BackSpace buttons to delete the needed content without adding the client code you are using. Could you please elaborate on what exactly you need to achieve with the client script you are implementing so we could provide proper solution for all browsers.

Greetings,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Elliott
Top achievements
Rank 2
answered on 09 Aug 2012, 07:06 PM
I go into a web page with a few RadDateInput controls
I enter a date into one of them
I then try to erase the box with either the delete key or the backspace
IE, Safari and Chrome let me - in Firefox and Opera the textbox is locked
0
Edward
Top achievements
Rank 1
answered on 13 Aug 2012, 07:47 AM
WIth "bad data", do you mean invalid date? This can be caused by a bug that is already fixed according to the release notes:
http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q2-2012-sp1-version-2012-2-724.aspx 
Fixed: Invalid value of RadDateInput is not properly cleared on the client when EnableSingleInputRendering="true"

What version do you use?
Tags
Input
Asked by
Elliott
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Elliott
Top achievements
Rank 2
Edward
Top achievements
Rank 1
Share this question
or