jquery ui timepicker onChange Event

use*_*918 4 jquery-ui jquery-ui-timepicker

我正在为JQuery ui timepicker插件的onchange苦苦挣扎:http://trentrichardson.com/examples/timepicker/

我使用以下代码.

$(document).ready(function ()
{
    $('#CutoffTime').timepicker({ stepMinute: 15 });
});
Run Code Online (Sandbox Code Playgroud)

//试图捕捉变化事件

$(function ()
{
    $('#CutoffTime').change(function ()
    {
        // do something heree
    });
});
Run Code Online (Sandbox Code Playgroud)

//我的HTML

<input type="text" id="CutoffTime" />
Run Code Online (Sandbox Code Playgroud)

出于某种原因,它似乎进入无限循环?有没有更好的方法来实现我所需要的?

grd*_*ult 7

如果你向下看页面,他们有一个使用onselect的例子

$('#CutoffTime').datetimepicker({
    stepMinute: 15,
    onSelect: function(dateText, inst){
        if(window.console)
            console.log(dateText);
    }
});
Run Code Online (Sandbox Code Playgroud)