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 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 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 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 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 commented Mar 9, 2017

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

This one is very useful.

@benjycui benjycui added help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. and removed 🗣 Discussion labels Mar 10, 2017
@benjycui
Copy link
Contributor

You can try to PR.

@benjycui benjycui added Feature and removed help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. labels Apr 1, 2017
@benjycui benjycui self-assigned this Apr 1, 2017
@benjycui
Copy link
Contributor

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

@damoasis
Copy link

Is there a schedule ?

@benjycui
Copy link
Contributor

Trace: react-component/calendar#284

@afc163
Copy link
Member

afc163 commented Aug 21, 2017

It was merged in antd-3.0.

@beiduo
Copy link

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 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

<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

同楼上,没有找到showPanels的API

@OPY-bbt
Copy link

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
Development

No branches or pull requests

10 participants