Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[评审]UI标准 - Calendar #52

Closed
DDDBear opened this issue May 12, 2013 · 0 comments
Closed

[评审]UI标准 - Calendar #52

DDDBear opened this issue May 12, 2013 · 0 comments
Labels

Comments

@DDDBear
Copy link
Contributor

DDDBear commented May 12, 2013

ECOM UI组件标准 - Calendar

继承层级

Calendar
    - InputControl
        - Control

功能描述

日历控件包括一个日期显示框和一个弹出层形式的单月日历。

prototype.type

"Calendar"

控件主元素

控件主元素必须为div。

数据格式说明

选中的日期,为Date类型的Javascript对象。

允许选择日期区间“range”的数据格式,以一个Object表示。该Object拥有name为begin和end的成员,分别为Date类型。

{
    begin: new Date(1983, 8, 3),
    end: new Date(2011, 10, 4)
}

属性

{string} dateFormat

日期显示的格式化方式。默认'yyyy-MM-dd'。

{string} paramDateFormat

日期参数的格式化方式。默认'yyyy-MM-dd'。

{Object} range

可选中的日期区间。可选,默认

{
    begin: new Date(1983, 8, 3),
    end: new Date(2046, 10, 4)
}

{Date} rawValue

当前选中的日期的原始数据。

公共实例方法

{Date} getRawValue()

获取当前选中的日期。

{void} setRange( {Object} range )

设置允许选中的日期区间。

参数:

  • {Object|string} range: 允许选中的日期区间

支持字符串型,‘,’分割起始时间和结束时间。如:1983-09-03,2046-11-04。

{void} setRawValue( {Date} value )

通过日期格式,设置当前选中的日期。

参数:

  • {Date} value: 当前选中的日期

事件

change

当选择的日期发生改变时触发。

事件对象成员:

  • {string}type: 事件名
  • {Date}rawValue: 选择的值,日期格式
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants