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
Closed

DatePicker, RangePicker javascript API to show time picker #5190

megawac opened this issue Mar 6, 2017 · 14 comments

Comments

@megawac
Copy link
Contributor

@megawac megawac 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
Copy link
Contributor

@benjycui benjycui 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
Copy link
Contributor Author

@megawac megawac 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
Copy link
Contributor

@benjycui benjycui 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
Copy link

@badplum badplum commented Mar 9, 2017

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

This one is very useful.

@benjycui
Copy link
Contributor

@benjycui benjycui commented Mar 10, 2017

You can try to PR.

@benjycui
Copy link
Contributor

@benjycui benjycui 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']} />

@shamoasis
Copy link

@shamoasis shamoasis commented May 17, 2017

Is there a schedule ?

@benjycui
Copy link
Contributor

@benjycui benjycui commented Jul 31, 2017

@afc163
Copy link
Member

@afc163 afc163 commented Aug 21, 2017

It was merged in antd-3.0.

@beiduo
Copy link

@beiduo beiduo 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
Copy link

@jkim506 jkim506 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.

@light-1986
Copy link

@light-1986 light-1986 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
Copy link

@happyeverday happyeverday commented May 25, 2018

同楼上,没有找到showPanels的API

@OPY-bbt
Copy link

@OPY-bbt OPY-bbt commented Nov 30, 2018

现在还没支持showPanels吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants