felixakiragreen / react-kronos

A fast, intuitive, and elegant date and time picker for React.
https://felixakiragreen.github.io/react-kronos/
MIT License
90 stars 28 forks source link

props.moment.settings does not seem to work #24

Closed xamfoo closed 8 years ago

xamfoo commented 8 years ago

Using version 1.2.2

Can't seem to change the calendar to start from Sunday instead of the default. I tried to use it like this in the render function but the calendar week still starts from Monday. I tested 'X' as a value in weekdaysMin but it is also not reflected in the calendar. Let me know if I am doing something wrong, or if there is anything else I can do.

const kronosOptions = {
  moment: {
    lang: 'en',
    settings: {
      week: { dow: 7  },
      weekdaysMin: ['X', 'T', 'W', 'T', 'F', 'S', 'S']
    }
  }
};

<Kronos date={ state.from }
        closeOnSelect= { false }
        closeOnBlur= { false }
        max={ (new Date()) }
        placeholder={ 'from' }
        options={ kronosOptions }
        onChange={ this._onChange.bind(this, 'from') }/>
felixakiragreen commented 8 years ago

Fixed in 1.2.3

Let me know if the problem still persists

(You'll need to change the order of weekdaysMin yourself)

xamfoo commented 8 years ago

Works now thanks for the quick response!