diff --git a/src/components/UseProductPop/index.jsx b/src/components/UseProductPop/index.jsx index b1062001..52e75a85 100644 --- a/src/components/UseProductPop/index.jsx +++ b/src/components/UseProductPop/index.jsx @@ -417,33 +417,33 @@ const UseProductPop = forwardRef((props, ref) => { } } - const onDisabledTime = (date) => { - let step1 = JSON.parse(sessionStorage.getItem("knockGold_effectDate")) - const min = new Date(step1.begin_time) - const hour = min.getHours() - const minute = min.getMinutes() - const second = min.getSeconds() - const isSame = isSameDay(date, min) + // const onDisabledTime = (date) => { + // let step1 = JSON.parse(sessionStorage.getItem("knockGold_effectDate")) + // const min = new Date(step1.begin_time) + // const hour = min.getHours() + // const minute = min.getMinutes() + // const second = min.getSeconds() + // const isSame = isSameDay(date, min) - return isSame - ? { - disabledHours: () => initArray(hour), - disabledMinutes: (hourValue) => (hourValue === hour ? initArray(minute) : []), - disabledSeconds: (hourValue, minuteValue) => - hourValue === hour && minuteValue === minute ? initArray(second) : [] - } - : {} - } - const onDisabledRange = (date, type) => { - let step1 = JSON.parse(sessionStorage.getItem("knockGold_effectDate")) - let disabled = false - if (step1) { - let str = moment(date).format("YYYY-MM-DD HH:mm:ss") - disabled = - moment(str).add(1, "days").isBefore(step1.begin_time) || moment(str).isAfter(step1.end_time) - } - return disabled - } + // return isSame + // ? { + // disabledHours: () => initArray(hour), + // disabledMinutes: (hourValue) => (hourValue === hour ? initArray(minute) : []), + // disabledSeconds: (hourValue, minuteValue) => + // hourValue === hour && minuteValue === minute ? initArray(second) : [] + // } + // : {} + // } + // const onDisabledRange = (date, type) => { + // let step1 = JSON.parse(sessionStorage.getItem("knockGold_effectDate")) + // let disabled = false + // if (step1) { + // let str = moment(date).format("YYYY-MM-DD HH:mm:ss") + // disabled = + // moment(str).add(1, "days").isBefore(step1.begin_time) || moment(str).isAfter(step1.end_time) + // } + // return disabled + // } const onUploadChangeGoods = (files, type) => { // 新增 @@ -533,8 +533,8 @@ const UseProductPop = forwardRef((props, ref) => { end_time: val }) }} - disabledTime={onDisabledTime} - disabledDate={onDisabledRange} + // disabledTime={onDisabledTime} + // disabledDate={onDisabledRange} /> ) : null}