Trent Richardson timepicker和datetimepicker的问题

Fri*_*pie 5 jquery jquery-ui datepicker datetimepicker timepicker

我正在尝试实施Trent的时间选择器,但我无法做到.我正在Chrome,Firefox和IE9中测试它.

我已经导入了Jquery和Jquery UI.我能找到的唯一常见错误是Jquery UI不是完整版(没有幻灯片),但这不是我的情况.无论如何,错误如下

Cannot set property 'formatTime' of undefined (line ...)
$.datepicker.formatTime = function(format, time, options) { (this is the line)

Cannot call method '_newInst' of undefined
$t.datepicker($.timepicker._newInst($t, o)._defaults);
Run Code Online (Sandbox Code Playgroud)

我会感谢任何帮助,我是jQuery的新手,我真的没有得到它.

小智 1

今天早些时候我也遇到了同样的问题。我通过确保我拥有最新版本的 jQuery 和 jQuery UI 解决了这个问题(起初我只更新了 jQuery,问题仍然存在)。我还会确保您拥有 Trent Richardson 的最新版本。