raddatepicker issue with firefox

7 posts, 0 answers
  1. newbie
    newbie avatar
    355 posts
    Member since:
    Feb 2008

    Posted 03 Feb 2010 Link to this post

    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?
  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 04 Feb 2010 Link to this post

    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.
  3. newbie
    newbie avatar
    355 posts
    Member since:
    Feb 2008

    Posted 04 Feb 2010 Link to this post

    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
  4. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 04 Feb 2010 Link to this post

    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.
  5. newbie
    newbie avatar
    355 posts
    Member since:
    Feb 2008

    Posted 04 Feb 2010 Link to this post

    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?
  6. newbie
    newbie avatar
    355 posts
    Member since:
    Feb 2008

    Posted 04 Feb 2010 Link to this post

    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?
  7. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 10 Feb 2010 Link to this post

    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.
Back to Top