EasyUI Forum
September 13, 2025, 07:29:56 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: numberspinner en dialog  (Read 9376 times)
Fabrice
Jr. Member
**
Posts: 62


View Profile
« on: October 20, 2014, 01:14:45 AM »

I use a previous post (createDialog) to open a dialog box with two fields numberspinner (to enter min and max values). this dialog have a cancel and ok buttons.
when i press tab key, focus go on inc/dec buttons but i only wan't go switch between min and max fields, is-it possible?
on opening window focus is on Ok button, if i press Enter button, window is closed and it's ok, but if i click on a field, Ok lost focus en Enter does'nt validate fields and does'nt close window. I try do bind keydown on dialog, it's work fine but if i click on a field, enter somes characters en press Enter, field is not updated with new value (OnChange isnot fired on numberspinner field). How can i do to validate new value when pressing Enter?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #1 on: October 20, 2014, 02:02:01 AM »

Please try to download the patch file from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip
Logged
Fabrice
Jr. Member
**
Posts: 62


View Profile
« Reply #2 on: October 20, 2014, 05:21:33 AM »

It's perfect for focus on numberspinner, but if i enter value in the field and then press enter key, OnChange event is not fired.

Is-it possible to add this addon in the patch for next patches releases : http://jsfiddle.net/2d7j3ft9/ ?
 
For information, in the patch for footer bar in datagrid, if datagrid is in a panel with split:true, when i resize panel, footer bar is lost.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #3 on: October 21, 2014, 01:53:49 AM »

Call 'textbox' method of numberspinner component to get the inputing box, you can bind 'keydown' event on it.
Code:
$('#nn').numberspinner('textbox').bind('keydown', function(e){
if (e.keyCode == 13){
$('#nn').numberspinner('setValue', $(this).val())
}
})
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!