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

RangePicker图标重叠 #4783

Closed
zhenzong opened this issue Feb 7, 2017 · 2 comments
Closed

RangePicker图标重叠 #4783

zhenzong opened this issue Feb 7, 2017 · 2 comments
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.

Comments

@zhenzong
Copy link
Contributor

zhenzong commented Feb 7, 2017

Environment(required)

  • antd version: 2.7.0
  • OS and its version: macOS Sierra 10.12.2
  • Browser and its version: safari: 10.0.2

RangePicker使用代码

<FormItem label="时间" hasFeedback {...formItemLayout}>
    {
        getFieldDecorator('time', {
            rules: [
                { require: true, type: 'array', message: '请选择时间段'}
            ],
            initialValue: [zhNowAfter7, zhNowAfter14]
        })(
            <RangePicker/>
        )
    }
</FormItem>

当RangePicker有校验状态的时候,校验状态的图标与日历选择的那个图标重叠。如下图:
wechatimg32
(这里通过css把日历选择那个图标设置大一点,图片上更清晰可以看到)

通过代码:

.ant-form-item-control.has-feedback {
    &.has-success,
    &.has-warning,
    &.has-error {
        .ant-calendar-picker-icon {
            right: 32px;
        }
    }
}

就可以解决这个问题,效果如下图:
wechatimg33

@benjycui
Copy link
Contributor

benjycui commented Feb 8, 2017

hasFeedback only works with Input, see: https://ant.design/components/form/#components-form-demo-validate-static

Sorry, could you create a PR to fix it?

@benjycui benjycui added 🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. labels Feb 8, 2017
zhenzong added a commit to zhenzong/ant-design that referenced this issue Feb 8, 2017
ddcat1115 pushed a commit that referenced this issue Feb 9, 2017
@afc163 afc163 closed this as completed Feb 9, 2017
@lock
Copy link

lock bot commented May 2, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.
Projects
None yet
Development

No branches or pull requests

3 participants