优化日期选择

This commit is contained in:
binbin_pan 2024-06-25 16:49:18 +08:00
parent 4d96be2a55
commit 968d953387
1 changed files with 3 additions and 2 deletions

View File

@ -540,10 +540,11 @@ export default {
},
computed: {
pickerOptions() {
// -
const currentDate = new Date(this.maForm.purchaseTime || new Date())
currentDate.setDate(currentDate.getDate() - 1)
return {
disabledDate(time) {
const currentDate = new Date()
currentDate.setHours(0, 0, 0, 0)
return time.getTime() < currentDate.getTime()
},
}