Date Picker without november 2020 days
Gesley opened this issue · comments
There's an issue with moment .endOf('month').
Just replace:
var lastDayOfMonth = firstDayOfMonth.clone().endOf('month');
to
var lastDayOfMonth = firstDayOfMonth.clone().add(1, 'months').subtract('days', 1);
in generateCalendar().
Here works like a charm.
I think there's a better solution, but for now this it's enough.
Like a charm, ok.
Live the diversity
thanks
Hello there, thanks for reporting this. Fabiano's trick works well as a temporary workaround but it seems like this is actually an issue to do with the moment library (see moment/moment#4727).
They have a PR awaiting merge so it shouldn't be too long before this gets sorted.
Many thanks,