jQuery引导datetimepicker字段事件(jQuery bootstrap datetimepicker field event)

编程入门 行业动态 更新时间:2024-10-24 14:24:26
jQuery引导datetimepicker字段事件(jQuery bootstrap datetimepicker field event)

我正在使用这个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 code

there is one more datitimepicker version and on that other one it's change.dp

更多推荐

field,字段,event,trigger,电脑培训,计算机培训,IT培训"/> <meta name="descri

本文发布于:2023-08-05 17:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1437394.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字段   事件   datetimepicker   jQuery   field

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!