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

date-picker extend options #1415

Merged
merged 8 commits into from
Apr 15, 2016
Merged

Conversation

qubaomingg
Copy link

In my business scene I need to format the time-picker of date-picker when option showTime is setted.

And I found the scene is a general demand, eg #771.

So, I send this PR, please think about it.

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @afc163 and @benjycui to be potential reviewers

@afc163
Copy link
Member

afc163 commented Apr 14, 2016

Extend the showTime prop is better.

<DatePicker showTime={{ format: ..., disabledHours: ... }}>

@qubaomingg
Copy link
Author

@afc163 your suggest is better. and I have modified, please review ~

const timePicker = props.showTime ? (
<TimePicker
prefixCls="ant-time-picker"
placeholder={locale.timePickerLocale.placeholder}
locale={locale.timePickerLocale}
transitionName="slide-up" />
transitionName="slide-up"
{...props.showTime}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be better.

        <TimePicker
          {...props.showTime}
          {...rcTimePickerProps}
          prefixCls="ant-time-picker"
          placeholder={locale.timePickerLocale.placeholder}
          locale={locale.timePickerLocale}
          transitionName="slide-up"
        />

@afc163
Copy link
Member

afc163 commented Apr 15, 2016

可以绑定下邮箱信息。

| onOk | 点击确定按钮的回调 | function(Date value) | 无 |
| getCalendarContainer | 定义浮层的容器,默认为 body 上新建 div | function(trigger) | 无 |
| showTime | 增加时间选择功能 | object | [TimePicker Options](http://ant.design/components/time-picker/#api) |
Copy link
Member

@afc163 afc163 Apr 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

object or bool

@afc163
Copy link
Member

afc163 commented Apr 15, 2016

还有 RangePicker 的 showTime 也同样支持下?麻烦了~

@afc163 afc163 merged commit 2d72bc5 into ant-design:develop-1.0.0 Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants