lumapps / lumX

The first responsive front-end framework based on Angular & Google Material Design specifications

Home Page:https://ui.lumapps.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Date Picker without november 2020 days

Gesley opened this issue · comments

when i try to select a day in november of a 2020 there are no one days to select.
error

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,