Hi all,
We have an issue with rendering a Sitefinity Widget that contains a KendoUI Calendar Control.
When we assign a array of Date objects to the calendar they don't appear within the Calendar. This only occurs within Safari on MacOS and on iPhones, but not in e.g. Chrome, FF, IE etc.
I'm not sure why this is. It seems to be related to parsing dates, but I don't know how we could fix this? This is the code that does the trick:
// disabledDates and formattedDates are of type Date[]
this
.disabledDates = formattedDates.map((date: Date) => {
return
new
Date(date.getFullYear(), date.getMonth(), date.getDate());
});
When I assign an array of dates manually, it seems to work:
this
.disabledDates = [
new
Date(2020, 7, 2),
new
Date(2020, 7, 4),
new
Date(2020, 7, 5),
new
Date(2020, 7, 6),
new
Date(2020, 7, 7),
];
Hope someone has a clue?
Thanks, Daniel