react-bootstrap-datetimepicker icon indicating copy to clipboard operation
react-bootstrap-datetimepicker copied to clipboard

Makes names of days in datepicker location aware

Open mathio opened this issue 9 years ago • 0 comments

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:

  1. not translated
  2. 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: screen shot 2016-05-11 at 14 39 02

mathio avatar May 11 '16 12:05 mathio