扩展jQuery UI datepicker [英] Extending jQuery UI datepicker
问题描述
我正在尝试通过$.widget
函数,以$.ui.datepicker
为基础的jQuery UI 1.10.3扩展jQuery的日期选择器.
I'm trying to extend jQuery's datepicker via the $.widget
function, jQuery UI 1.10.3, with $.ui.datepicker
as the base.
似乎$.ui.datepicker
是一个对象(与其他所有小部件几乎不一样),并且$.widget
在尝试实例化基础时抛出TypeError.
It seems that $.ui.datepicker
is an object (unlike pretty much all the other widgets) and $.widget
throws a TypeError when trying to instantiate the base.
有什么办法解决这个问题吗?
Is there any way around this?
推荐答案
来自 blgt 的评论:
日期选择器不使用窗口小部件工厂,因此您不能使用它来扩展它.
The datepicker does not use the widget factory and thus you can't use it to extend it
似乎正在进行重写,该操作应使用小部件工厂实现Datepicker
It seems like there is a rewrite underway, which should implement Datepicker using the widget factory.
这篇关于扩展jQuery UI datepicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!