Answer the question
In order to leave comments, you need to log in
Why is the code not working on iphone?
Method:
disabledDateFrom(date) {
let dis = true
let last = null
let dateForFinish = new Date(date).setHours(23, 59)
let dateForStart = new Date(date).setHours(0, 0)
if(this.freDate.length > 0) {
for (let key in this.freDate) {
if(this.freDate[key].DateStart) {
let dateFinish = new Date(this.freDate[key].DateFinish).valueOf()
let dateStart = new Date(this.freDate[key].DateStart).valueOf()
if(dateForFinish > dateStart && dateForStart < dateFinish){
dis = false
}
last = dateFinish
} else {
let dateFinish = new Date(this.freDate[key].DateFinish).valueOf()
let dateStart = last
if(dateForFinish > dateStart && dateForStart < dateFinish){
dis = false
}
}
}
} else {
dis = false
}
return dis
},
<b-form-datepicker
v-model="form.dateFrom"
:min="minDateTo"
:date-disabled-fn="disabledDateFrom"
:disabled="disableDateFrom"
placeholder="Дата получения"
v-bind="labels || {}"
:hide-header="true"
:dark="true"
locale="ru-RU"
:date-format-options="{ year: 'numeric', month: 'numeric', day: 'numeric' }"
:state="getValidationState(validationContext)"
></b-form-datepicker>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question