Skip to content

Commit b1b511d

Browse files
authored
Allow the start and end dates to be Moment instances
1 parent e5fc110 commit b1b511d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ DatetimeRangePicker.propTypes = {
223223
onStartDateFocus: PropTypes.func,
224224
onStartDateChange: PropTypes.func,
225225
pickerClassName: PropTypes.string,
226-
endDate: PropTypes.instanceOf(Date),
226+
endDate: PropTypes.oneOfType([PropTypes.instanceOf(Moment), PropTypes.instanceOf(Date)]),
227227
endTimeConstraints: PropTypes.object, // eslint-disable-line
228-
startDate: PropTypes.instanceOf(Date),
228+
startDate: PropTypes.oneOfType([PropTypes.instanceOf(Moment), PropTypes.instanceOf(Date)]),
229229
startTimeConstraints: PropTypes.object, // eslint-disable-line
230230
dateFormat: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
231231
timeFormat: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),

0 commit comments

Comments
 (0)