Home Reference Source Repository
public class | source

TimePicker

Extends:

react~Component → TimePicker

时间弹窗选择器

Constructor Summary

Public Constructor
public

constructor(props: Object, context: Object)

构造函数

Member Summary

Public Members
public

组件内部状态值

Method Summary

Public Methods
public

componentWillReceiveProps(objectPattern: {"selectedTime": *})

public

render(): *

Public Constructors

public constructor(props: Object, context: Object) source

构造函数

Params:

NameTypeAttributeDescription
props Object

组件所使用的属性

props.selectedTime string
  • optional

当前选中的日期

props.minDate string
  • optional
  • default: '00:00:00'

最小可选择的日期

props.maxDate string
  • optional
  • default: '23:59:59'

最大可选择的日期

props.hourUnit string
  • optional
  • default: ''

小时的单位文案

props.minuteUnit string
  • optional
  • default: ''

分钟的单位文案

props.secondUnit string
  • optional
  • default: ''

秒的单位文案

props.visible boolean
  • optional

选择器是否显示

props.title PropTypes.node
  • optional

选择器标题

props.confirmText PropTypes.node
  • optional
  • default: '确定'

确认按钮文案

props.cancelText PropTypes.node
  • optional
  • default: '取消'

取消按钮文案

props.onConfirm function
  • optional

确认按钮的回调函数

props.onCancel function
  • optional

取消按钮的回调函数

props.onChange function

选中某一个项时触发的函数回调

context Object

Public Members

public state: Object source

组件内部状态值

Properties:

NameTypeAttributeDescription
state.selectedTime Date

当前选中的时间

Public Methods

public componentWillReceiveProps(objectPattern: {"selectedTime": *}) source

Params:

NameTypeAttributeDescription
objectPattern {"selectedTime": *}
  • default: {"selectedTime":null}

public render(): * source

Return:

*