PAMapp/components/DateTimePicker.vue | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 | |
PAMapp/components/Interview/InterviewAdd.vue | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 | |
PAMapp/components/Ui/UiDatePicker.vue | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 |
PAMapp/components/DateTimePicker.vue
@@ -4,6 +4,7 @@ <div class="dateTime"> <UiDatePicker @changeDate="changeDateTime($event, 'date')" :disabledBeforeSpecificDate="disabledBeforeSpecificDate" :isPastDateDisabled="isPastDateDisabled" :isFutureDateDisabled="isFutureDateDisabled" :defaultValue="defaultValue" @@ -35,6 +36,9 @@ @Prop() isFutureDateDisabled!: boolean; @Prop() disabledBeforeSpecificDate?: string; @Emit('changeDateTime') changeDateTime(event, type) { if (type === 'date') { PAMapp/components/Interview/InterviewAdd.vue
@@ -21,8 +21,10 @@ ><i class="icon-edit"></i></span> </el-col> </el-row> <template v-if="!interviewId || isEdit"> <DateTimePicker :disabledBeforeSpecificDate="appointmentDetail.appointmentDate" @changeDateTime="interviewTime = $event" :defaultValue="defaultValue" ></DateTimePicker> PAMapp/components/Ui/UiDatePicker.vue
@@ -31,6 +31,9 @@ @Prop({default: false}) isFutureDateDisabled!: boolean; @Prop() disabledBeforeSpecificDate?: string; @Emit('changeDate') changeDate() { return this.dateValue; @@ -48,6 +51,16 @@ const date = new Date(); const currentDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`; if (!!this.disabledBeforeSpecificDate) { const compareDate = new Date(this.disabledBeforeSpecificDate); return { disabledDate(time: Date) { const pickedDate = `${time.getFullYear()}/${time.getMonth() + 1}/${time.getDate()}`; return new Date(pickedDate).getTime() < compareDate.getTime(); } } } if (this.isPastDateDisabled) { return { disabledDate(time: Date) {