Skip to content

Commit

Permalink
refs: #48
Browse files Browse the repository at this point in the history
  • Loading branch information
samoay committed Jan 8, 2019
1 parent 6c69bea commit 0df2c9d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
32 changes: 30 additions & 2 deletions 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 Expand Up @@ -292,7 +320,7 @@ class Demo extends React.Component {
</p>
<RangeCalendar
size="middle"
value={rangeValue}
value={[undefined, undefined]}
onSelect={(v, formatted) => {
console.log(v, formatted);
this.onRangeSelect(v, formatted);
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 0df2c9d

Please sign in to comment.