react-bootstrap-datetimepicker
react-bootstrap-datetimepicker copied to clipboard
Makes names of days in datepicker location aware
Currently the names of days (above the date picker) are hard coded strings starting with "Su" (for Sunday). However this is not always correct, since start of the week is calculated based on moment and its locale.
Example:
When I change moment locale to for example Slovak:
import moment from 'moment';
import 'moment/locale/sk';
The week is supposed to start with Monday instead of Sunday. Weeks are correctly started with Monday, however day names at top (Su, Mo, Tu ...) are:
- not translated
- still start with Sunday
This pull request fixed both issues - it translates day names based on moment locale and also starts with correct day name.
Screenshot:
