Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endDate bug only shows 1969 year #28

Open
Baut1 opened this issue Dec 12, 2023 · 2 comments
Open

endDate bug only shows 1969 year #28

Baut1 opened this issue Dec 12, 2023 · 2 comments

Comments

@Baut1
Copy link

Baut1 commented Dec 12, 2023

So basically even though i give the component the ":end-date" parameter it shows me the dates only between Dec 29, 1968 and Jan 3 1970.

<calendar-heatmap :end-date="2023-12-12" :values="[{ date: '1969-6-6', count: 6 }]" dark-mode/>

Is it possible this is a bug?

contribs

@omarhabeh
Copy link

This happened because they have bad support for vue3, this happens for :values as well, there is two solution for this:

  1. :end-date="'2023-12-12'", string inside of variable
  2. create them as date, :end-date="new Date('2023-12-12')" ( I recommend this), I have found this answer after facing same problem.

@Baut1
Copy link
Author

Baut1 commented Jan 21, 2024

Yes, i ended up finding a solution using

<script setup lang="ts">
    const currentDate = new Date()
    const endDate = currentDate.toISOString().split('T')[0]
</script>
<template>
    <calendar-heatmap
        class="calendar"
        :end-date="endDate"
        ...
/>
</template>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants