Skip to content

Commit

Permalink
Fix date label in ChartDisplay.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
IMB11 committed Jul 17, 2024
1 parent 387b079 commit b768490
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/frontend/src/components/ui/charts/ChartDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
<div>
<h2>Rolling Ranges</h2>
<div class="button-group left">
<Button v-for="range in ranges" :key="range.getLabel([new Date(), new Date()])"
@click="changeRangeModal(range)"
<Button v-for="range in ranges" :key="range.getLabel([dayjs(), dayjs()])" @click="changeRangeModal(range)"
:class="`button-base ${selectedRange === range ? 'button-base__selected' : ''}`">
{{ range.getLabel([new Date(), new Date()]) }}
{{ range.getLabel([dayjs(), dayjs()]) }}
</Button>
</div>
</div>
Expand Down Expand Up @@ -487,7 +486,7 @@ const defaultRanges: RangeObject[] = [
{
getLabel: () => "Last quarter",
getDates: (currentDate: dayjs.Dayjs) => ({
startDate: dayjs(currentDate).subtract(3, 'month').startOf('quarter'),
startDate: dayjs(currentDate).subtract(3, 'month').startOf('month'),
endDate: currentDate,
}),
timeResolution: 10080,
Expand Down

0 comments on commit b768490

Please sign in to comment.