gdmvip
1
look my js code
var start_time_searcha = app.calendar.create({
inputEl: '#start_time_searcha',
locale:'cn',
dateFormat:"yyyy-mm-dd",
minDate:new Date().getTime() - 24 * 60 * 60 * 1000,
disabled: {
from: new Date(2021,03,25),
to: new Date(2021,03,28)
},
});
Disabled dates can still be selected
why?
gdmvip
2
The above method has been solved
disabled: [new Date(2015, 10, 10), new Date(2015, 10, 11)],
But it’s not working
deejay
3
month arg is zero-based index
// new Date(2021,3,25)
=> new Date(2021,2,25)
gdmvip
4
I’ve tried it before, but it doesn’t seem to work
disabled: [new Date(2021, 3, 28), new Date(2021, 3, 29)],
gdmvip
5
var start_time_searcha = app.calendar.create({
inputEl: ‘#start_time_searcha’,
locale:‘cn’,
backdrop:true,
dateFormat:“yyyy-mm-dd”,
minDate:new Date().getTime() - 24 * 60 * 60 * 1000,
disabled: [new Date(2021, 3, 28), new Date(2021, 3, 29)],
on:{open:function(){
}}
});
I’ve tried it before, but it doesn’t seem to work
gdmvip
6
calendar.update() It can only be valid after “calendar.open()”, otherwise the prompt time is invalid
For example, I set disabled
Not quite understand