Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
How to block Tab Key of a key board in WebDateTimeEditor
posted

Hi

 

I am using WebDateTimeEditor  in my asp.net project and I need to disable Enter Key and Tab key of a ketboard in WebDateTimeEditor . For Enter key I use hideEnterkey="True" and it disable the enter key . So like that I want to disable Tab key also . Can some one please give me a solution for this problem ?

Parents
No Data
Reply
  • 37874
    Verified Answer
    posted

    Hi Sujay,

    You can achieve this by canceling thr KeyDown client-side event if the pressed key is Tab, for example:

    function WebDateTimeEditor1_KeyDown(sender, eventArgs) {
        if (eventArgs.get_browserEvent().keyCode == 9) {
            eventArgs.set_cancel(true);
        }
    }

    Let me know if this helps.

Children