Open leipert opened 7 years ago
Sorry, there is no rule for that yet. I don't know if this is really of relevance in this lib as it would "pollute" the real information a user would like to see. Legally seen the it would be correct to show each Sunday in the list. I am undecided in this case.
I agree with @commenthol that it would be a kind of pollution. But i need the option to declare the sundays as holiday too. Or just to check if the selected date is a sunday. Is there any option for this?
edit i've hacked it with the following
var calendarConfig = {
onChange: [
// Check Holiday and alert the extra charge information
function(selectedDates, dateStr, instance){
if(hd.isHoliday(new Date(dateStr)) || selectedDates.toString().indexOf("Sun") === 0 ){
....
}
}
works for me with the single date selection. didnt tested it with range/multi dateselect
@Maybach91 No there is no such option. As you are checking date by date I would recommend to use the new Date(dateStr).getDay() === 0
comparison instead of checking the localized string.
This is not fixed in #12:
Technically every sunday is a holiday in
DE-HE
.I do not know how you want to handle this.