jquery datepicker将事件添加到下一个和上一个按钮 [英] jquery datepicker adding event to next and previous button

查看:87
本文介绍了jquery datepicker将事件添加到下一个和上一个按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我显示一个3个月的日期选择器,右下角有一个按钮可以提前一个月。我想为这个下一个按钮添加一个事件,我想用这个按钮触发一个onther函数,但是下个月还要显示一下。

I display a datepicker with 3 months, and in the right corner there is the next button to go one month ahead. I want to add an event to this next button, i want to trigger an onther function with this button, but also the next month has to show up ofcourse.

推荐答案

您可以使用 .on()的代理创建此按钮的点击处理程序:

You could just create click handler for this button using delegation with .on():

$(document).on('click','.ui-datepicker-next',function(){
     alert('next btn clicked');
});

这篇关于jquery datepicker将事件添加到下一个和上一个按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆