Skip to content

Commit 31e1256

Browse files
committed
fix(DatePicker): disabledHours no use in time end panel
1 parent 04f9466 commit 31e1256

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/date-picker/range-picker.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,12 @@ export default class RangePicker extends Component {
484484

485485
// 如果用户没有给定时间禁用逻辑,则给默认到禁用逻辑,即如果是同一天,则时间不能是同样的
486486
getDisabledTime = ({ startValue, endValue }) => {
487-
const { disabledHours, disabledMinutes, disabledSeconds } = this.props;
487+
const { disabledHours, disabledMinutes, disabledSeconds } = this.props.showTime || {};
488488

489489
let disabledTime = {};
490490

491491
if (startValue && endValue) {
492492
const isSameDay = startValue.format('L') === endValue.format('L');
493-
494493
const newDisabledHours = isFunction(disabledHours) ?
495494
disabledHours : (index) => {
496495
if (isSameDay && index < startValue.hour()) {

0 commit comments

Comments
 (0)