diff --git a/components/date-picker/createPicker.jsx b/components/date-picker/createPicker.jsx index a888df4675..9a9819ebcd 100644 --- a/components/date-picker/createPicker.jsx +++ b/components/date-picker/createPicker.jsx @@ -22,12 +22,14 @@ export default function createPicker(TheCalendar) { }); } } + clearSelection = (e) => { e.preventDefault(); e.stopPropagation(); this.setState({ value: null }); this.handleChange(null); } + handleChange = (value) => { const props = this.props; if (!('value' in props)) { diff --git a/components/date-picker/style/RangePicker.less b/components/date-picker/style/RangePicker.less index 3aabfaf01b..047c77ed0d 100644 --- a/components/date-picker/style/RangePicker.less +++ b/components/date-picker/style/RangePicker.less @@ -57,13 +57,6 @@ margin-left: -29px; } - .@{calendar-prefix-cls}-time-picker-wrap { - left: 115px; - } - &-right .@{calendar-prefix-cls}-time-picker-wrap { - left: 100px; - } - &.@{calendar-prefix-cls}-time &-right .@{calendar-prefix-cls}-date-input-wrap { margin-left: -15px; } diff --git a/components/date-picker/style/TimePicker.less b/components/date-picker/style/TimePicker.less index 23f3b20a68..e3181bfa63 100644 --- a/components/date-picker/style/TimePicker.less +++ b/components/date-picker/style/TimePicker.less @@ -11,17 +11,14 @@ .@{calendar-prefix-cls}-clear-btn { direction: ltr; } - .@{calendar-prefix-cls}-time-picker-wrap { - position: absolute; - right: 0; - } } .@{calendar-prefix-cls}-input, .@{timepicker-prefix-cls}-input { - // .input; - } - .@{timepicker-prefix-cls}-input { - display: none; + .input; + border-radius: @border-radius-sm; + height: @input-height-sm; + width: 96px; + margin-right: 6px; } .@{calendar-prefix-cls}-input { padding-right: 21px; @@ -30,9 +27,6 @@ min-width: 168px; } .@{timepicker-prefix-cls}-icon { - font-family: "anticon" !important; - position: relative; - content: "\E643"; - display: inline; + display: none; } }