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

raddatepicker issue with firefox

6 Answers 100 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
newbie
Top achievements
Rank 1
newbie asked on 04 Feb 2010, 12:37 AM
I have an issue with the raddatepicker when running in firefox. If the user enters an invalid date and tab out i pop up an invalid date message and set the focus back to the control

function

 

ShowError(sender, args) {

 

alert(

"Enter a Valid Date in MM/DD/YYYY or MM/DD/YY Format");

 

sender.focus();

}


when in firefox the cursor blinks in the text entry area but the user cannot enter anything without clicking in the box. This behavior does not appear with ie.
I want to have the same behavior with ff, help?

6 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 04 Feb 2010, 06:03 PM
Hello,

Please try the following approach:
function ShowError(sender, args)
{
    alert("Enter a Valid Date in MM/DD/YYYY or MM/DD/YY Format");
    setTimeout(function() { sender.focus(); }, 200);
}

I hope this helps.

Regards,
Daniel
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
newbie
Top achievements
Rank 1
answered on 04 Feb 2010, 06:09 PM
Hi Daniel,
this approach does not work.
I still have the cursor blinking in the textbox but i am unable to enter anything without clicking in the textbox. It still behaves the same with firefox
0
Daniel
Telerik team
answered on 04 Feb 2010, 07:18 PM
Hello,

Unfortunately I'm unable to reproduce this behavior on my end. Please provide more details on your scenario/setup - browser version, RadControls version, etc.

For your convenience I attached a sample project that uses the same approach - let me know whether it works for you.

Best regards,
Daniel
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
newbie
Top achievements
Rank 1
answered on 04 Feb 2010, 07:25 PM
Daniel,

I am sorry for my earlier post. I just realized it was my browser cache which was not recognizing the new js.
I am able to type in the control now. Only I noticed that the wrong date is still there in the textbox and the cursor is at the end of the text in the field and the textbox is not highlighted in red as it does in IE.

can i delete the text and have the box highlighted in red?
0
newbie
Top achievements
Rank 1
answered on 04 Feb 2010, 07:35 PM
Another update to my post below:

I observed that this behavior was due to another change i made to the date control.
i Added this js code to override the default setting of the correct date :

 

function

 

ValueChanging(sender, eventArgs) {

 

 

if (new Date(eventArgs.get_newValue()) == "NaN") {

 

eventArgs.set_cancel(

true);

 

}

}



This code does not allow my alert popup to show.

However when I comment this code I still have the wrong data in the textbox. i would like that to be cleared and the cursor blink at the start.

Is there anyway I can have this code and not have that interfere with my display of error?
0
Daniel
Telerik team
answered on 10 Feb 2010, 02:17 PM
Hello,

I modified the demo in accordance with your requirements - please check it out and let me know if you need further assistance.

Best regards,
Daniel
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Calendar
Asked by
newbie
Top achievements
Rank 1
Answers by
Daniel
Telerik team
newbie
Top achievements
Rank 1
Share this question
or