Skip to content

Commit 63533e5

Browse files
Greg Smithmartijnrusschen
Greg Smith
authored andcommitted
Added check on utcOffset to see if it was passed with a zero value (Hacker0x01#949)
* Added check on utcOffset to see if it was passed with a zero value * Changed the check for utcOffset to check for values that are not undefined
1 parent eb80e0d commit 63533e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datepicker.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export default class DatePicker extends React.Component {
116116
this.props.openToDate ? moment(this.props.openToDate)
117117
: this.props.selectsEnd && this.props.startDate ? moment(this.props.startDate)
118118
: this.props.selectsStart && this.props.endDate ? moment(this.props.endDate)
119-
: this.props.utcOffset ? moment.utc().utcOffset(this.props.utcOffset)
119+
: (typeof this.props.utcOffset !== 'undefined') ? moment.utc().utcOffset(this.props.utcOffset)
120120
: moment()
121121
const minDate = getEffectiveMinDate(this.props)
122122
const maxDate = getEffectiveMaxDate(this.props)

0 commit comments

Comments
 (0)