Skip to content

Commit 92974bf

Browse files
authored
fix: hide indicator when current time is not in the interval (jquense#1639)
1 parent 841cdcb commit 92974bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/DayColumn.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class DayColumn extends React.Component {
9999

100100
if (current >= min && current <= max) {
101101
const top = this.slotMetrics.getCurrentTimePosition(current)
102+
this.intervalTriggered = true
102103
this.setState({ timeIndicatorPosition: top })
103104
} else {
104105
this.clearTimeIndicatorInterval()
@@ -163,7 +164,7 @@ class DayColumn extends React.Component {
163164
<span>{localizer.format(selectDates, 'selectRangeFormat')}</span>
164165
</div>
165166
)}
166-
{isNow && (
167+
{isNow && this.intervalTriggered && (
167168
<div
168169
className="rbc-current-time-indicator"
169170
style={{ top: `${this.state.timeIndicatorPosition}%` }}

0 commit comments

Comments
 (0)