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

1st week is missed if 1st day of the month belongs to Sunday and "firstDay" param is used #132

Closed
viart opened this issue May 24, 2013 · 3 comments

Comments

@viart
Copy link

viart commented May 24, 2013

From: http://amsul.ca/pickadate.js/date.htm#first-weekday

Screenshot

Months to reproduce - Sep 2013, Dec 2013 ...

My fast-fix:
https://github.com/amsul/pickadate.js/blob/gh-pages/lib/picker.date.js#L193

day: isInfiniteValue || value.getDay(),

->

day: isInfiniteValue || value.getDay() || (calendar.settings.firstDay ? 7 : 0),
@nicolai86
Copy link

👍 this solves my issue as well.

@amsul
Copy link
Owner

amsul commented May 25, 2013

Thanks for pointing it out. Your solution should work fine for the basic cases - however it may not work in validating if a date is disabled or not.

I’ve added an alternate fix to the edge branch to merge in soon..

Cheers :)

@amsul amsul closed this as completed in e5783ed May 25, 2013
@viart
Copy link
Author

viart commented May 27, 2013

@amsul that is why it is called "fast-fix" :)

Thanks for the proper fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants