This commit is contained in:
iriska-gri committed 2024-07-12 15:20:33 +03:00
1 parent 4690dc2fd2
commit 1f4ecc8fcb
1 file changed
+24 -11
@@ -42,11 +42,7 @@
:min=" :min="
order[0] == 2 order[0] == 2
? false ? false
: new Date( : minData()
new Date(limitation).setDate(
new Date(limitation).getDate() - 1
)
)
" "
/> />
</v-locale-provider> </v-locale-provider>
@@ -141,16 +137,32 @@ export default {
const creatwdDate = (date, time) => { const creatwdDate = (date, time) => {
if (props.order[0] == 4) { if (props.order[0] == 4) {
props.limitation; if (time == "0:00") {
propsDateEvent.value = propsDateEvent.value = date;
new Date(formatDash(date) + "T" + time) >= props.limitation } else if (
? new Date(formatDash(date) + "T" + time) new Date(formatDash(date) + "T" + time) >= new Date(props.limitation)
: props.limitation; ) {
propsDateEvent.value = new Date(formatDash(date) + "T" + time);
} else {
propsDateEvent.value = props.limitation;
}
} else { } else {
propsDateEvent.value = new Date(formatDash(date) + "T" + time); propsDateEvent.value =
time == "0:00" ? date : new Date(formatDash(date) + "T" + time);
} }
}; };
const minData = () => {
let h = `${new Date(props.limitation).getHours()}:${String(
new Date(props.limitation).getMinutes()
).padStart(2, "0")}`
let min =
h == '0:00'?
new Date(props.limitation) :
new Date(new Date(props.limitation).setDate(new Date(props.limitation).getDate() - 1))
return new Date(min)
}
return { return {
propsDateEvent, propsDateEvent,
menudate, menudate,
@@ -158,6 +170,7 @@ export default {
modelDate, modelDate,
formatComa, formatComa,
timeEvent, timeEvent,
minData
}; };
}, },
}; };