react-big-calendar
Advanced tools
Comparing version 0.28.3 to 0.28.4
@@ -232,2 +232,4 @@ "use strict"; | ||
var originalStart = start; | ||
var originalEnd = end; | ||
var rowBox = (0, _Selection.getBoundsForNode)(node); | ||
@@ -238,5 +240,4 @@ var cursorInRow = (0, _selection.pointInBox)(rowBox, point); | ||
if (cursorInRow) { | ||
if (metrics.last < start) return this.reset(); // add min | ||
end = dates.add(metrics.getDateForSlot((0, _selection.getSlotAtX)(rowBox, point.x, false, metrics.slots)), 1, 'day'); | ||
if (metrics.last < start) return this.reset(); | ||
end = metrics.getDateForSlot((0, _selection.getSlotAtX)(rowBox, point.x, false, metrics.slots)); | ||
} else if (dates.inRange(start, metrics.first, metrics.last) || rowBox.bottom < point.y && +metrics.first > +start) { | ||
@@ -251,3 +252,7 @@ end = dates.add(metrics.last, 1, 'milliseconds'); | ||
end = dates.max(end, dates.add(start, 1, 'day')); | ||
end = dates.merge(end, accessors.end(event)); | ||
if (dates.lt(end, start)) { | ||
end = originalEnd; | ||
} | ||
} else if (direction === 'LEFT') { | ||
@@ -265,3 +270,7 @@ // inbetween Row | ||
start = dates.min(dates.add(end, -1, 'day'), start); | ||
start = dates.merge(start, accessors.start(event)); | ||
if (dates.gt(start, end)) { | ||
start = originalStart; | ||
} | ||
} | ||
@@ -268,0 +277,0 @@ |
{ | ||
"name": "react-big-calendar", | ||
"version": "0.28.3", | ||
"version": "0.28.4", | ||
"description": "Calendar! with events", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -34,4 +34,4 @@ # react-big-calendar | ||
`react-big-calendar` includes two options for handling the date formatting and culture localization, depending | ||
on your preference of DateTime libraries. You can use either the [Moment.js](http://momentjs.com/) or [Globalize.js](https://github.com/jquery/globalize) localizers. | ||
`react-big-calendar` includes three options for handling the date formatting and culture localization, depending | ||
on your preference of DateTime libraries. You can use either the [Moment.js](https://momentjs.com/), [Globalize.js](https://github.com/jquery/globalize) or [date-fns](https://date-fns.org/) localizers. | ||
@@ -38,0 +38,0 @@ Regardless of your choice, you **must** choose a localizer to use this library: |
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
1141994
26526