Skip to content

Commit

Permalink
update right arrow disabled logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanweiler92 committed Oct 18, 2023
1 parent a0557e6 commit e84bb18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/js/containers/timeline/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ const checkRightArrowDisabled = (
timelineEndDateLimit,
) => {
const nextIncMoment = moment.utc(date).add(delta, timeScaleChangeUnit);
const nextIncrementDate = new Date(nextIncMoment.seconds(0).format());

const nextIncrementDateTime = nextIncrementDate.getTime();
const maxPlusDeltaDateTime = new Date(timelineEndDateLimit).getTime();
return nextIncrementDateTime > maxPlusDeltaDateTime;
const startOfDayNextIncrement = nextIncMoment.startOf('day').valueOf();
const startOfDayLimit = moment.utc(timelineEndDateLimit).startOf('day').valueOf();

return startOfDayNextIncrement > startOfDayLimit;
};

const checkNowButtonDisabled = (
Expand Down

0 comments on commit e84bb18

Please sign in to comment.