扩展 jQuery UI 日期选择器 [英] Extending jQuery UI datepicker

查看:29
本文介绍了扩展 jQuery UI 日期选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 $.widget 函数扩展 jQuery 的 datepicker,jQuery UI 1.10.3,以 $.ui.datepicker 为基础.p>

似乎 $.ui.datepicker 是一个对象(与几乎所有其他小部件不同)并且 $.widget 在尝试实例化基础时抛出 TypeError.

有没有办法解决这个问题?

解决方案

来自 blgt 的评论:

<块引用>

日期选择器不使用小部件工厂,因此您不能使用它来扩展它

似乎正在进行 rewrite,应该使用小部件工厂实现 Datepicker.

I'm trying to extend jQuery's datepicker via the $.widget function, jQuery UI 1.10.3, with $.ui.datepicker as the base.

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?

解决方案

From comments by blgt:

The datepicker does not use the widget factory and thus you can't use it to extend it

It seems like there is a rewrite underway, which should implement Datepicker using the widget factory.

这篇关于扩展 jQuery UI 日期选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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