Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date Picker without november 2020 days #610

Open
Gesley opened this issue Oct 1, 2018 · 3 comments
Open

Date Picker without november 2020 days #610

Gesley opened this issue Oct 1, 2018 · 3 comments
Labels

Comments

@Gesley
Copy link

Gesley commented Oct 1, 2018

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

@fabianocruzdf
Copy link

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.

@Gesley
Copy link
Author

Gesley commented Oct 1, 2018

Like a charm, ok.
Live the diversity

thanks

@arnaudvalle
Copy link
Contributor

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,

@arnaudvalle arnaudvalle added the bug label Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants