Home Reference Source Repository
import CalendarPanel from 'melon-calendar/src/calendar/Panel.js'
public class | source

CalendarPanel

Extends:

React.Component → CalendarPanel

melon-calendar 日期选择主面板

Constructor Summary

Public Constructor
public

构造函数

Member Summary

Public Members
public

组件状态

Method Summary

Public Methods
public

组件每次更新属性时判断是否需要同步状态

public

选择某一天时触发

public

render(): React.Element

渲染

public

shouldComponentUpdate(nextProps: Object, nextState: Object): bool

判断是否需要更新,性能优化

Protected Methods
protected

点击 Header 切换日期、年/月选择

protected

月份翻页器改变

protected

年/月选择改变的事件

Public Constructors

public constructor(props: Object) source

构造函数

Params:

NameTypeAttributeDescription
props Object

组件属性

Public Members

public state: Object source

组件状态

Public Methods

public componentWillReceiveProps(nextProps: Object) source

组件每次更新属性时判断是否需要同步状态

Params:

NameTypeAttributeDescription
nextProps Object

新属性

public onDateChange(e: Object) source

选择某一天时触发

Params:

NameTypeAttributeDescription
e Object

事件对象

public render(): React.Element source

渲染

Return:

React.Element

public shouldComponentUpdate(nextProps: Object, nextState: Object): bool source

判断是否需要更新,性能优化

Params:

NameTypeAttributeDescription
nextProps Object

组件新的属性

nextState Object

组件新的状态

Return:

bool

是否需要更新

Protected Methods

protected onHeaderClick(e: Object) source

点击 Header 切换日期、年/月选择

Params:

NameTypeAttributeDescription
e Object

事件对象

protected onPagerChange(e: Object) source

月份翻页器改变

Params:

NameTypeAttributeDescription
e Object

事件对象

protected onSelectorChange(e: Object) source

年/月选择改变的事件

Params:

NameTypeAttributeDescription
e Object

事件对象