@blueprintjs/datetime
Advanced tools
Comparing version 1.9.1 to 1.10.0
@@ -37,2 +37,6 @@ /* | ||
_this.handleDateRangePickerChange = function (selectedRange) { | ||
// ignore mouse events in the date-range picker if the popover is animating closed. | ||
if (!_this.state.isOpen) { | ||
return; | ||
} | ||
if (_this.props.value === undefined) { | ||
@@ -89,2 +93,6 @@ var _a = dateUtils_1.fromDateRangeToMomentDateRange(selectedRange), selectedStart = _a[0], selectedEnd = _a[1]; | ||
_this.handleDateRangePickerHoverChange = function (hoveredRange) { | ||
// ignore mouse events in the date-range picker if the popover is animating closed. | ||
if (!_this.state.isOpen) { | ||
return; | ||
} | ||
if (hoveredRange == null) { | ||
@@ -91,0 +99,0 @@ // undo whatever focus changes we made while hovering |
@@ -226,3 +226,3 @@ /* | ||
_super.prototype.componentWillReceiveProps.call(this, nextProps); | ||
var nextState = getStateChange(this.props.value, nextProps.value, this.state); | ||
var nextState = getStateChange(this.props.value, nextProps.value, this.state, nextProps.contiguousCalendarMonths); | ||
this.setState(nextState); | ||
@@ -382,3 +382,3 @@ }; | ||
var value = this.state.value; | ||
var nextState = getStateChange(value, nextValue, this.state); | ||
var nextState = getStateChange(value, nextValue, this.state, this.props.contiguousCalendarMonths); | ||
if (!this.isControlled) { | ||
@@ -398,3 +398,3 @@ this.setState(nextState); | ||
var leftView = this.state.leftView.clone(); | ||
if (!rightView.isBefore(rightView)) { | ||
if (!rightView.isAfter(leftView)) { | ||
leftView = rightView.getPreviousMonth(); | ||
@@ -417,3 +417,3 @@ } | ||
exports.DateRangePicker = DateRangePicker; | ||
function getStateChange(value, nextValue, state) { | ||
function getStateChange(value, nextValue, state, contiguousCalendarMonths) { | ||
var returnVal; | ||
@@ -486,4 +486,5 @@ if (value != null && nextValue == null) { | ||
leftView = nextValueStartMonthAndYear; | ||
rightView = nextValueStartMonthAndYear.getNextMonth(); | ||
} | ||
if (!rightView.isSame(nextValueEndMonthAndYear)) { | ||
if (contiguousCalendarMonths === false && !rightView.isSame(nextValueEndMonthAndYear)) { | ||
rightView = nextValueEndMonthAndYear; | ||
@@ -490,0 +491,0 @@ } |
{ | ||
"name": "@blueprintjs/datetime", | ||
"version": "1.9.1", | ||
"version": "1.10.0", | ||
"description": "Components for interacting with dates and times", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1281635
9675