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
timePicker能否增加rangepicker子组件 #8584
Comments
It will be better to write your issue/comment in English, so more people can understand you. |
Hello @vonxq, we use GitHub issues to trace bugs or discuss plans of Ant Design. So, please don't ask usage questions here. You can try to ask questions on Stack Overflow or Segment Fault, then apply tag |
Temporary solution const { RangePicker } = DatePicker;
<RangePicker
defaultValue={[
moment('1989-09-07 09:00', 'YYYY-MM-DD HH:mm'),
moment('1989-09-07 22:00', 'YYYY-MM-DD HH:mm'),
]}
placeholder={['Start Time', 'End Time']}
showTime={{ format: 'HH:mm' }}
format="HH:mm"
mode={['time', 'time']}
dropdownClassName="clean-to-time-range-picker"
/> <Global
styles={{
'.clean-to-time-range-picker .ant-calendar-time-picker-btn': {
display: 'none !important',
},
'.clean-to-time-range-picker .ant-calendar-time-picker-inner': {
paddingTop: '0 !important',
},
}}
/> |
What problem does this feature solve?
选时间段组件,像TimePicker的rangePicker选month和date一样
antd3.0里RangePicker也支持mode=['time', 'time'],但这个默认弹出显示的还是['date', 'date'],只能选完date后再选时间,最终的返回值里也是包含date信息的moment值
本来自己用 to 也可以做到,但表单中的处理有点复杂,表项的required判断也需要一些逻辑。
Request for time range picker 提供时间段选择器这个issue里@benjycui说的形式不知能否实现呢?能做到这一步也是挺好的
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: