Skip to content

Commit

Permalink
Merge pull request #629 from XiaoMi/hotfix/#615
Browse files Browse the repository at this point in the history
Hotfix/#615
  • Loading branch information
solarjoker authored Sep 4, 2019
2 parents 71cacb4 + f8f15fa commit cced73e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions components/date-picker/BasePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ class BasePicker extends Component {
}
_icon () {
const {isFocus} = this.state
const { clearable } = this.props
const { clearable, type, showTime } = this.props
const iconCls = classNames(
'hi-datepicker__input-icon',
'hi-icon',
(isFocus && clearable) ? 'icon-close-circle clear' : 'icon-date'
(isFocus && clearable) ? 'icon-close-circle clear' : ((showTime || type === 'timeperiod') ? 'icon-time' : 'icon-date')
)
return (isFocus && clearable)
? <span className={iconCls} onClick={this._clear.bind(this)} />
Expand All @@ -282,12 +282,13 @@ class BasePicker extends Component {
const {
localeDatas,
disabled,
showTime
showTime,
type
} = this.props
const _cls = classNames(
'hi-datepicker__input',
'hi-datepicker__input--range',
showTime && 'hi-datepicker__input--range-time',
(showTime || type === 'timeperiod') && 'hi-datepicker__input--range-time',
disabled && 'hi-datepicker__input--disabled'
)
return (
Expand Down
4 changes: 4 additions & 0 deletions components/date-picker/style/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ $basic-color: #4284f5 !default;
&--range {
width: 320px;

&-time {
width: 400px;
}

input {
flex: 0 1 40%;
text-align: center;
Expand Down

0 comments on commit cced73e

Please sign in to comment.