From b9abf7714e54ef01a212366adffe09fec29039ba Mon Sep 17 00:00:00 2001 From: Jean Lazarou Date: Mon, 20 Apr 2020 15:31:29 +0200 Subject: [PATCH] fix: prevent endless loop when adding event the DST begin day (#1635) * Prevent endless loop when adding event the DST begin day * Add a comment for the reason of the change --- src/DayColumn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DayColumn.js b/src/DayColumn.js index 8474a0eda..71331ca12 100644 --- a/src/DayColumn.js +++ b/src/DayColumn.js @@ -349,7 +349,7 @@ class DayColumn extends React.Component { while (dates.lte(current, endDate)) { slots.push(current) - current = dates.add(current, this.props.step, 'minutes') + current = new Date(+current + this.props.step * 60 * 1000) // using Date ensures not to create an endless loop the day DST begins } notify(this.props.onSelectSlot, {