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

DatePicker, RangePicker javascript API to show time picker #5190

Closed
megawac opened this issue Mar 6, 2017 · 14 comments

Comments

Projects
None yet
10 participants
@megawac
Copy link
Contributor

commented Mar 6, 2017

In the DatePicker and RangePicker it would be useful to have a javascript API to open the time picker. I want to open the time picker interface after the user selects a date instead of having the user click the select time picker to update the time. This would force the user to acknowledge the time they've set.

@benjycui

This comment has been minimized.

Copy link
Contributor

commented Mar 7, 2017

How about:

DatePicker[mode=year|month|date|time] 
DatePicker[onPanelChange(mode): void]

We can set which panel are showed now, and listen to panel change.

@megawac

This comment has been minimized.

Copy link
Contributor Author

commented Mar 7, 2017

Yeah that would meet my needs; it would also be nice to be able to detect if a value was changed with the date picker or time picker. Though this can be inferred at the moment so it is not a big deal

@benjycui

This comment has been minimized.

Copy link
Contributor

commented Mar 7, 2017

So, just:

DatePicker[mode=year|month|date|time] 
DatePicker[onPanelChange(value, mode): void]

similar to https://ant.design/components/calendar/

@badplum

This comment has been minimized.

Copy link

commented Mar 9, 2017

DatePicker[mode=year|month|date|time]

This one is very useful.

@benjycui

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2017

You can try to PR.

@benjycui

This comment has been minimized.

Copy link
Contributor

commented May 17, 2017

After we implement this feature, we can make RangePicker works like RangeYearPicker, RangeMonthPicker, RangeTimePicker:

<RangePicker format="YYYY" showPanels={['year', 'year']} />
<RangePicker format="YYYY-MM" showPanels={['month', 'month']} />
<RangePicker format="HH:mm:ss" showPanels={['time', 'time']} />
@ueedon

This comment has been minimized.

Copy link

commented May 17, 2017

Is there a schedule ?

@benjycui

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2017

@afc163

This comment has been minimized.

Copy link
Member

commented Aug 21, 2017

It was merged in antd-3.0.

@beiduo

This comment has been minimized.

Copy link

commented Sep 15, 2017

this feature would be really awesome! (just looking for if there is any official solution with month range picker then found this exciting news and really thrilled for it)

@jkim506

This comment has been minimized.

Copy link

commented Feb 28, 2018

https://ant.design/components/date-picker/

Under 'controlled panels', it shows DatePicker using modes and onPanelChanged but these typings are only on RangePicker. Also, the example shown isn't even working.

@aibaiejoy

This comment has been minimized.

Copy link

commented Apr 19, 2018

<RangePicker format="YYYY" showPanels={['year', 'year']} />
<RangePicker format="YYYY-MM" showPanels={['month', 'month']} />
<RangePicker format="HH:mm:ss" showPanels={['time', 'time']} />

这个showPanels 的api在3.0以上的最新版本里面,有api吗?没有看到。

@happyeverday

This comment has been minimized.

Copy link

commented May 25, 2018

同楼上,没有找到showPanels的API

@OPY-bbt

This comment has been minimized.

Copy link

commented Nov 30, 2018

现在还没支持showPanels吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.