Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var numberOfMonths = isMobile ? 1 : 2;
if (this.noArgs && argState[this.props.id] !== undefined && Object.keys(argState[this.props.id]).length > 0) {
if (_typeof(argState[this.props.id].min) !== undefined) {
startDate = (0, _moment2.default)(argState[this.props.id].min);
initialVisibleMonth = function initialVisibleMonth() {
return startDate;
};
}
endDate = _typeof(argState[this.props.id].max) !== undefined ? (0, _moment2.default)(argState[this.props.id].max) : null;
}
return _react2.default.createElement(
'div',
{ className: focusedInput ? 'cr-daterange-wrapper cr-daterange-wrapper--focused' : 'cr-daterange-wrapper' },
_react2.default.createElement(_reactDates.DateRangePicker, _extends({}, this.props, {
onDatesChange: this.onDatesChange,
onFocusChange: this.onFocusChange,
focusedInput: focusedInput,
startDate: startDate,
endDate: endDate,
initialVisibleMonth: initialVisibleMonth,
displayFormat: 'DD/MM/YYYY',
numberOfMonths: numberOfMonths
}))
);
}
}]);