Baremetrics / calendar

Date range picker for Baremetrics
MIT License
679 stars 78 forks source link

Added periods translation option and populate days array using Moment.js weekdaysMin as default option #31

Closed enekochan closed 8 years ago

enekochan commented 8 years ago

I've added a new option to translate the periods strings.

I've also changed the days array default values from the array of strings (['S', 'M', ...]) to the weekdaysMin function from Moment.js that already deals with locale. The only diference is that it uses 2 letters instead of 1.

kalepail commented 8 years ago

Unfortunately not going to merge this. I'd like the default weeks array to be single letters. If you'd like to use the doubles just set the days_array key to moment.weekdaysMin().

As for the period translation this would need to be part of a much larger feature including the ability to set the period time frames as well.. not just their strings. (see https://github.com/Baremetrics/calendar/issues/9)

Sorry :/

Thanks for the PR though and for using the calendar! I have plans to support custom time periods/intervals in the near future.

enekochan commented 8 years ago

No problem.

I though later about just using moment.weekdaysMin() as a parameter to days_arrayoption, so is still possible to use it :)

As for #9 I'll try to do it if I have some free time.