How to write ele.me time control dynamically disabled

Business scenario
clipboard.png


clipboard.png

Business Code

                startDate: {
                    disabledDate: (time) => {
                        let timeChange = false;
                        this.basicInfo.salesDateRange.forEach((item, index) => {
                            const time1 = (Date.parse(this.startDate) > time.getTime()) ||
                                (Date.parse(this.endDate) < time.getTime());
                            const time2 = (Date.parse(item.start) <= time.getTime()) &&
                                (Date.parse(item.end) > time.getTime());
                            // const time3 = Date.parse(this.basicInfo.endDate) < item.end;
                            // this.$logger.log(time3);
                            // this.index = index;
                            if (time1 || time2) {
                                timeChange = true;
                            }
                        });
                        return timeChange;
                    }
                },
                endDate: {
                    disabledDate: (time) => {
                        let timeChange = false;
                        this.basicInfo.salesDateRange.forEach((item, index, arr) => {
                            this.time1 = (Date.parse(this.startDate) > time.getTime()) ||
                                (Date.parse(this.endDate) < time.getTime());
                            this.time2 = (Date.parse(item.start) < time.getTime()) &&
                                (Date.parse(item.end) > time.getTime());
                            // this.timeList = [];
                            // if (item.end !== arr[index + 1].startDate) {
                            //     time.timeList.push({ start: arr[index + 1].startDate, end: item.end });
                            // }
                            // const time3 = Date.parse(arr[this.index + 1].end) > Date.parse(this.basicInfo.salesDetail.startDate) &&
                            //               Date.parse(item.start) < Date.parse(this.basicInfo.salesDetail.startDate);
                        });

                        if (this.time1 || this.time2) {
                            timeChange = true;
                        }
                        return timeChange;
                    }
                }
Jul.07,2021

* * startDate: {

                    disabledDate: (time) => {
                        let timeChange = false;
                        let flageTime1 = true;
                        let flageTime2 = true;
                        this.basicInfo.salesDateRange.forEach((item, index) => {
                            //
                            this.time1 = (Date.parse(this.startDate) >= time.getTime()) ||
                                (Date.parse(this.endDate) <= time.getTime());
                            //
                            this.time2 = ((Date.parse(item.start) - 1) <= time.getTime()) &&
                                (Date.parse(item.end) >= time.getTime());

                            if (this.basicInfo.salesDetail.endDate) {
                                if ((Date.parse(this.basicInfo.salesDetail.endDate) < Date.parse(item.end)) && flageTime1) {
                                    this.index = index;
                                    flageTime1 = false;
                                }
                            }

                            if (this.time1 || this.time2) {
                                timeChange = true;
                            }
                        });
                        //
                        if (this.basicInfo.salesDetail.endDate && flageTime2) {
                            this.time5 = (Date.parse(this.basicInfo.salesDateRange[this.index].start) > time.getTime());
                            flageTime2 = false;
                        }
                        if (this.basicInfo.salesDetail.endDate) {
                            if (timeChange || this.time5) {
                                timeChange = true;
                            }
                        }

                        return timeChange;
                    }
                },
                endDate: {
                    disabledDate: (time) => {
                        let timeChange = false;
                        let flageTime1 = true;
                        let flageTime2 = true;
                        this.basicInfo.salesDateRange.forEach((item, index, arr) => {
                            this.time3 = (Date.parse(this.startDate) > time.getTime()) ||
                                (Date.parse(this.endDate) < time.getTime());
                            this.time4 = (Date.parse(item.start) <= time.getTime()) &&
                                (Date.parse(item.end) >= time.getTime());

                            if (this.basicInfo.salesDetail.startDate) {
                                if ((Date.parse(this.basicInfo.salesDetail.startDate) < Date.parse(item.start)) && flageTime1) {
                                    this.index = index;
                                    flageTime1 = false;
                                }
                            }

                            if (this.time3 || this.time4) {
                                timeChange = true;
                            }
                        });
                        if (this.basicInfo.salesDetail.startDate && flageTime2) {
                            this.time6 = (Date.parse(this.basicInfo.salesDateRange[this.index].end) > time.getTime());
                            flageTime2 = false;
                        }
                        if (this.basicInfo.salesDetail.startDate) {
                            if (timeChange || this.time6) {
                                timeChange = true;
                            }
                        }
                        return timeChange;
                    }
                }**
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b357d9-2bfb1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b357d9-2bfb1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?