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

Use moment.weekdaysMin() for weekdays #178

Closed
jesenko opened this issue Aug 24, 2015 · 2 comments
Closed

Use moment.weekdaysMin() for weekdays #178

jesenko opened this issue Aug 24, 2015 · 2 comments

Comments

@jesenko
Copy link

jesenko commented Aug 24, 2015

Considering that moment is used for formatting of date-related stuff in datepicker (e.g. month+year in calendar header), why is it not used to obtain weekdays?

I am currently setting it as

const weekdays = moment.weekdaysMin()
<Datepicker weekdays={weekdays} />

I assume this would be sensible default - also taking into account locale property of <Datepicker />?

Current implementation also overrides moment locale setting with weekdays as set in Datepicker (https://github.com/Hacker0x01/react-datepicker/blob/master/src/calendar.jsx#L59), which can be rather surprising for the user of the component.

@RSO
Copy link
Contributor

RSO commented Sep 14, 2015

SGTM. Not sure if I can find the time to work on this, so a PR would be much appreciated.

@rafeememon
Copy link
Contributor

Fixed by #277

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