Skip to content

Commit

Permalink
Merge pull request #49 from uxcore/width-style-fix
Browse files Browse the repository at this point in the history
refs: #48
  • Loading branch information
veryStarters authored Jan 8, 2019
2 parents 6c69bea + 53e1d7d commit 6993844
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
30 changes: 29 additions & 1 deletion demo/CalendarDemo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,35 @@ class Demo extends React.Component {
<Calendar
showToday
showTime={false}
allowClear={false}
allowClear
showSecond={false}
locale="en-us"
yearSelectOffset={100}
yearSelectTotal={200}
size="middle"
disabledTime={() => (
{
disabledMinutes: () => disabledMinutes,
}
)}
value={value}
onSelect={this.onSelect}
showDateInput
/>
</div>
<div
className="kuma-form-field"
style={{
width: '50px',
}}
>
<p>
显示空间不够
</p>
<Calendar
showToday
showTime={false}
allowClear
showSecond={false}
locale="en-us"
yearSelectOffset={100}
Expand Down
2 changes: 1 addition & 1 deletion src/YearCalendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ YearCalendar.propTypes = {
hasTrigger: PropTypes.bool,
showDateInput: PropTypes.bool,
align: PropTypes.object,
transitionName: PropTypes.bool,
transitionName: PropTypes.string,
};

export default YearCalendar;
8 changes: 8 additions & 0 deletions src/style/common/Calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@
position: relative;
display: inline-block;
width: 100%;
min-width: 80px;

.kuma-input{
padding-right: 28px;
text-overflow: ellipsis;
overflow: hidden;
}

.kuma-input[readonly] {
background-color: white;
border-color: @border-color;
Expand Down

0 comments on commit 6993844

Please sign in to comment.