Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
自定义jQuery Datepicker下一步按钮行为_Jquery_Datepicker - Fatal编程技术网

自定义jQuery Datepicker下一步按钮行为

自定义jQuery Datepicker下一步按钮行为,jquery,datepicker,Jquery,Datepicker,我正在开发一个航空公司预订系统,我们使用一个高度定制的jQuery日期选择器来显示我们乘坐给定航线的日期。最新的要求是当用户单击“下个月”时进行自定义跳转,即如果该月没有航班(通过beforeShowDay回调没有可选择的天数设置),日历将跳转到下一个可用航班所在的月份。比如: function handleMonthYearChange(year, month, inst){ // look-up month with next available flights - say two

我正在开发一个航空公司预订系统,我们使用一个高度定制的jQuery日期选择器来显示我们乘坐给定航线的日期。最新的要求是当用户单击“下个月”时进行自定义跳转,即如果该月没有航班(通过beforeShowDay回调没有可选择的天数设置),日历将跳转到下一个可用航班所在的月份。比如:

 function handleMonthYearChange(year, month, inst){
    // look-up month with next available flights - say two months from now.
    // get the dpInstance, and then force a custom span 
    $.datepicker._adjustDate(dpInstance ,**2**,'M'); 
}
我想我可以给month参数分配我自己的值,然后让函数返回。没有这样的运气

日历加载时执行setSelectable逻辑的所有代码都已写入并处于活动状态。 我需要能够捕捉这些用户界面点击上一页和下一页,做我的“下一个航班”查找,然后跳转到下一个月与可选择的日期

非常感谢您的任何建议


马克

你能把剩下的代码贴出来吗?谢谢你的回复。事实上,使用内置的onMonthYearChange事件并设置日期选择器的默认日期,我已经取得了一些进展<代码>代码var dateOfNextFlight=getNextFlightDate()$(此).datepicker('option','defaultDate',dateOfNextFlight)$(此)。日期选择器(“显示”)<代码>代码不确定我的格式在那里发生了什么:(