From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 四月 2025 12:18:03 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/zshare/mutilform/mkDatePicker/index.jsx | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx b/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx index a3d0899..48ababe 100644 --- a/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx +++ b/src/tabviews/zshare/mutilform/mkDatePicker/index.jsx @@ -3,6 +3,8 @@ import { DatePicker } from 'antd' import moment from 'moment' +import MKEmitter from '@/utils/events.js' + const { MonthPicker } = DatePicker /** @@ -37,8 +39,8 @@ this.state = { value, - minDate: config.minDate ? moment().add(config.minDate, 'days').endOf('day') : '', - maxDate: config.maxDate ? moment().add(config.maxDate, 'days').endOf('day') : '', + minDate: config.minDate ? moment(config.minDate).startOf('day') : '', + maxDate: config.maxDate ? moment(config.maxDate).endOf('day') : '', mode, format } @@ -68,6 +70,17 @@ } this.props.onChange(_val) + + if (!config.enter || config.enter === 'false') return + + setTimeout(() => { + if (config.enter === 'tab') { + MKEmitter.emit('mkFC', 'focus', config.tabUuid) + } else if (config.enter === 'sub') { + config.tabUuid && MKEmitter.emit('mkFC', 'focus', config.tabUuid) + this.props.onSubmit(config.tabUuid) + } + }, 50) } disabledDate = (current) => { @@ -76,7 +89,7 @@ if (!current || (!maxDate && !minDate)) { return false } - + if (!maxDate) { return current < minDate } else if (!minDate) { -- Gitblit v1.8.0