Skip to content

Commit

Permalink
[fixed] recalc timeList when locale info changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Oct 8, 2015
1 parent f002680 commit bf468be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/TimeList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ export default React.createClass({
, focusedItem = this._closestDate(data, nextProps.value)
, valChanged = !dates.eq(nextProps.value, this.props.value, 'minutes')
, minChanged = !dates.eq(nextProps.min, this.props.min, 'minutes')
, maxChanged = !dates.eq(nextProps.max, this.props.max, 'minutes');
, maxChanged = !dates.eq(nextProps.max, this.props.max, 'minutes')
, localeChanged = this.props.format !== nextProps.format
|| this.props.culture !== nextProps.culture;

if (valChanged || minChanged || maxChanged){
if (valChanged || minChanged || maxChanged || localeChanged){
this.setState({
focusedItem: focusedItem || data[0],
dates: data
Expand Down

0 comments on commit bf468be

Please sign in to comment.