fix: should work with timepicker without minutes and so on, ref: #3793 (#3799)

This commit is contained in:
Benjy Cui 2016-11-11 17:50:48 +08:00 committed by 偏右
parent ad808953fd
commit c073e78074
3 changed files with 16 additions and 7 deletions

View File

@ -27,8 +27,8 @@ function range(start, end) {
function disabledDate(current) {
// can not select days after today
return current && current.valueOf() > Date.now();
// can not select days before today and today
return current && current.valueOf() < Date.now();
}
function disabledDateTime() {

View File

@ -53,7 +53,7 @@
float: right;
.@{calendar-prefix-cls} {
&-time-picker-inner {
margin-left: 21px;
margin-left: 3%;
border-left: 1px solid @border-color-split;
}
}
@ -164,6 +164,7 @@
&.@{calendar-prefix-cls}-time {
.@{calendar-timepicker-prefix-cls} {
height: 207px;
width: 97%;
top: 68px;
z-index: 2; // cover .ant-calendar-range .ant-calendar-in-range-cell > div (z-index: 1)
&-panel {
@ -183,8 +184,6 @@
border-top: 1px solid @border-color-split;
}
&-select {
width: 71px;
ul {
max-height: 206px;
}
@ -209,3 +208,9 @@
}
}
}
.@{calendar-prefix-cls}-range.@{calendar-prefix-cls}-show-time-picker {
.@{calendar-prefix-cls}-body {
border-top-color: transparent;
}
}

View File

@ -22,6 +22,10 @@
background-clip: padding-box;
line-height: 1.5;
overflow: hidden;
width: 100%;
}
&-combobox {
width: 100%;
}
&-1-column,
@ -29,7 +33,7 @@
width: 100%;
}
&-2-columns &-select {
width: 115px;
width: 50%;
}
&-1-column &-select,
&-2-columns &-select {
@ -50,7 +54,7 @@
border-width: 0 1px;
margin-left: -1px;
box-sizing: border-box;
width: 77px;
width: 33.6%;
overflow: hidden;
position: relative; // Fix chrome weird render bug