We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Focus on numerictextbox

Thread ID:

Created:

Updated:

Platform:

Replies:

132891 Sep 27,2017 06:48 AM Sep 28,2017 08:44 AM JavaScript 1
loading
Tags: ejNumericTextbox
Semper
Asked On September 27, 2017 06:48 AM

Hi,

how to programatically set focus to numerictextbox?

Simple $("#SomeControl").focus(); doesen't work.



Ashokkumar Balasubramanian [Syncfusion]
Replied On September 28, 2017 08:44 AM

Hi Semper,   
   
In our Numeric, Currency, Percentage Textboxes having two inputs (hidden and input element). Both the inputs are switching while interacting with the numeric textbox. Initially hidden Input is displayed to the user, while interact numeric textbox, element will be displayed. So, you can apply the jQuery focus on hidden input to focusing the Numeric Textbox. Please check the below code block.   
 
[Scripts]   
   
var numeric = $("#ejNumeric").ejNumericTextbox("instance");   
numeric._hiddenInput.focus();   
   
  
For your reference, we have prepared simple sample. Please check the sample in below playground location.   
   
 
Please let us know, if the provided information’s are helpful to achieve your requirement or not.  
 
Regards,    
Ashokkumar B.    


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;