jQuery.ptTimeSelect 时间控件

jQuery ptTimeSelect 是一款用于实现时间选择功能的插件。它通过将时间选择弹出窗口附加到输入字段来让用户能够方便地选择时间。该插件包含两个文件:.css 和 .js,并需要在使用前引入 jQuery 库。用户可通过设置参数来自定义插件的外观和行为。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

jQuery.ptTimeSelect

http://pttimeselect.sourceforge.net/example/index.html

Documentation

Installation

There are two files (.css and .js) delivered with this plugin and that must be incluced in your html page after the jquery.js library, and prior to making any attempts at using it.  Both of these are to be included inside of the ‘head’ element of the document.

Usage

$(ele).ptTimeSelect()

Attaches a ptTimeSelect widget to each matched element.  Matched elements must be input fields that accept a values (input field).  Each element, when focused upon, will display a time selection popoup where the user can define a time.

PARAMS
@param {OBJECT} opt(Optional) An object with the options for the time selection widget.
OPTIONS
containerClassString.  A class to be assocated with the popup widget.  (default: none)
containerWidthString.  Css width for the container.  (default: none)
hoursLabelString.  Label for the Hours.  (default: Hours)
minutesLabelString.  Label for the Mintues.  (default: Minutes)
setButtonLabelString.  Label for the Set button.  (default: SET)
popupImageString.  The html element (ex. img or text) to be appended next to each input field and that will display the time select widget upon click.
zIndexInt.  Interger for the popup widget z-index.
onBeforeShowFunction.  Function to be called before the widget is made visible to the user.  Function is passed 2 arguments: 1) the input field as a jquery object and 2) the popup widget as a jquery object.
onCloseFunction.  Function to be called after closing the popup widget.  Function is passed 1 argument: the input field as a jquery object.
onFocusDisplayBoolean.  True or False indicating if popup is auto displayed upon focus of the input field.  (default:true)
RETURNS
  • @return {object} jQuery
EXAMPLE
$('#fooTime').ptTimeSelect();

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值