EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 16, 2024, 06:14:10 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
enter functionality for easyui-datebox
Poll
Question:
how to call the function by clicking enter in datebox
how to call the function by clicking enter in datebox
0 (0%)
how to call the function by clicking enter in datebox
0 (0%)
how to call the function by clicking enter in datebox
0 (0%)
Total Voters: 0
Pages: [
1
]
« previous
next »
Print
Author
Topic: enter functionality for easyui-datebox (Read 8025 times)
srg
Newbie
Posts: 5
enter functionality for easyui-datebox
«
on:
May 05, 2014, 03:12:12 AM »
Hi All,
For easyui-datebox, without key handler, is there any other way to call a function by clicking an enter key (like onKeyPress, onKeyUp...). I tried like below..
<div class="formCell">
input id="timiLimitFrom" name="<%= Constants.FILTER_FIELD_TIME_LIMIT_FROM %>" type="text" class="easyui-datebox" sharedCalendar="#sc" data-options="formatter:dateFormat,parser:dateParser,validType:'europeanDateValidator'" style="width:100px;"
onkeypress="if (event.which == 13) { inboxFilter.apply(); }"/>
</div>
This is my current code. but it is not calling if i click enter on datebox. Could anyone please help. and currently my date box in jsp page is as shown in attachment...
..
Thanks in advance,
SRG...
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: enter functionality for easyui-datebox
«
Reply #1 on:
May 05, 2014, 06:59:29 AM »
If you want to bind the 'keypress' event on the text box, call 'textbox' method to get the text box before binding any events on it.
Code:
$('#dd').datebox('textbox').bind('keypress',function(e){
console.log(e.keyCode)
});
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...