Skip to content

Ext.picker.Time

xtype 为 timepicker 的 Ext JS 原生组件参考。

Updated View as Markdown

源码定义:ext-all-debug.js:110021。分类:选择器与滑块。

创建示例

var component = Ext.create("Ext.picker.Time", {
  xtype: "timepicker",
  componentCls: Ext.baseCSSPrefix + 'timepicker',
  displayField: 'disp',
  format: "g:i A",
  increment: 15,
  renderTo: Ext.getBody()
});

属性

属性 类型 默认值 说明 配置示例
componentCls Mixed Ext.baseCSSPrefix + 'timepicker' 配置 componentCls 对应的 CSS 类名。 componentCls: Ext.baseCSSPrefix + 'timepicker'
displayField String 'disp' 下拉或选择组件显示给用户的记录字段。 displayField: 'disp'
format String "g:i A" =undefined] The default time format string which can be overriden for localization support. The format must be valid according to Ext.Date#parse. Defaults to 'g:i A', e.g., '3:15 PM'. For 24-hour time format try 'H:i' instead. format: "g:i A"
increment Number 15 The number of minutes between each time value in the list. increment: 15
loadMask Boolean false 控制是否启用 loadMask 行为。 loadMask: false
maxValue Date - The maximum time to be shown in the list of times. This must be a Date object (only the time fields will be used); no parsing of String values will be done. maxValue: { /* 配置 */ }
minValue Date - The minimum time to be shown in the list of times. This must be a Date object (only the time fields will be used); no parsing of String values will be done. minValue: { /* 配置 */ }

方法

方法 参数 说明 调用示例
initComponent `` 初始化组件及其子项。 执行时会保留父类默认行为、更新 absMinabsMax 状态。源码涉及 createStore()updateList()callParent() component.initComponent()
setMinValue value 设置 minValue。 执行时会更新 minValue 状态。源码涉及 updateList() component.setMinValue(...)
setMaxValue value 设置 maxValue。 执行时会更新 maxValue 状态。源码涉及 updateList() component.setMaxValue(...)
normalizeDate date 规范化 date component.normalizeDate(...)
updateList `` 更新 list。源码涉及 normalizeDate() component.updateList()
createStore `` 创建 store component.createStore()
focusNode rec 将焦点移动到 node component.focusNode(...)

事件

源码中未找到该组件自身注册的事件;可监听继承事件。

Navigation

Type to search…

↑↓ navigate↵ selectEsc close