我正在使用这个Datetimepicker ,我想在选择日期时分配事件触发器,以便我可以计算另一个字段的差异
问题是,如果我使用这样的点击
$(document).on('click', '.item',function(){ ...用户实际上并没有点击该字段,而是实际上不在此字段中的焦点的datetimepicker窗口......我也尝试过
选择焦点更改
他们都是一种工作,但用户需要再次点击或浏览该领域......总之需要额外的行动......
所以问题是:
是否有一些事件触发器可以识别输入字段的变化?
I'm using this Datetimepicker and i want to assign an event trigger when date has been chosen so that i can calculate the difference in another field
the problem is that if i use click like this
$(document).on('click', '.item',function(){ ...The user is not actually clicking the field but the datetimepicker windows that is actually out of the focus from this field...and i have also tried with
select focus change
they all kind a work but the user needs to click again or go over that field...in short additional actions are needed...
So the question is:
Is there some event trigger that can recognize the input field change?
最满意答案
为了捕获datetimepicker字段的更改,您需要使用此命令
$(document).on('dp.change', '.item',function(){ . . .// your code还有一个datitimepicker版本,另一个是change.dp
In order to catch the change of the field of datetimepicker you need to use this command
$(document).on('dp.change', '.item',function(){ . . .// your codethere is one more datitimepicker version and on that other one it's change.dp
更多推荐
field,字段,event,trigger,电脑培训,计算机培训,IT培训"/> <meta name="descri
发布评论