jQuery EasyUI 表单插件 - Timespinner 时间微调器

jQuery EasyUI 教程 · 2019-04-07 19:57:42

扩展自 $.fn.spinner.defaults。通过 $.fn.timespinner.defaults 重写默认的 defaults。

时间微调器(timespinner)是基于微调器(spinner)创建的。它与数值微调器(numberspinner)相似,但是它只显示时间值。时间微调器(timespinner)允许用户通过点击组件右侧的小微调按钮来增加或减少时间。

依赖

  • spinner

用法

从标记创建时间微调器(timespinner)。

<input id="ss" class="easyui-timespinner" style="width:80px;"
    required="required" data-options="min:'08:30',showSeconds:true">

使用 javascript 创建时间微调器(timespinner)。

<input id="ss" style="width:80px;">
$('#ss').timespinner({
    min: '08:30',
    required: true,
    showSeconds: true
});

属性

该属性扩展自微调器(spinner),下面是为时间微调器(timespinner)添加的属性。

名称 类型 描述 默认值
separator string 时分秒之间的分隔符。 :
showSeconds boolean 定义是否显示秒的信息。 false
highlight number 初始高亮的域,0 = 时,1 = 分,... 0

事件

该事件扩展自微调器(spinner)。

方法

该方法扩展自微调器(spinner),下面是为时间微调器(timespinner)重写的方法。

名称 参数 描述
options none 返回选项(options)对象。
setValue value 设置时间微调器(timespinner)的值。
代码实例:
$('#ss').timespinner('setValue', '17:45');  // set timespinner value
var v = $('#ss').timespinner('getValue');  // get timespinner value
alert(v);
getHours none 获取当前的时钟的值。
getMinutes none 获取当前的分钟的值。
getSeconds none 获取当前的秒钟的值。

点击查看所有 jQuery EasyUI 教程 文章: https://codercto.com/courses/l/42.html

查看所有标签

Approximation Algorithms

Approximation Algorithms

Vijay V. Vazirani / Springer / 2001-07-02 / USD 54.95

'This book covers the dominant theoretical approaches to the approximate solution of hard combinatorial optimization and enumeration problems. It contains elegant combinatorial theory, useful and inte......一起来看看 《Approximation Algorithms》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换