fengyuanchen / vue-countdown

Countdown component for Vue.js.
https://fengyuanchen.github.io/vue-countdown/
MIT License
690 stars 89 forks source link

Custom Interval error #87

Closed kt-vee closed 1 year ago

kt-vee commented 1 year ago

Hi, I'm using your docs for setting a custom interval countdown (date of May 23, 2023) but am running into an error. Can you let me know where I'm going wrong? It works when I use your NYE count down but breaks on my own countdown.

<script>
import SideBar from '../components/UI/SideBar.vue'
import SvgIcon from '@jamescoyle/vue-icon';
import { mdiProgressAlert } from '@mdi/js';
import VueCountdown from '@chenfengyuan/vue-countdown';

export default {
  components: {
    SideBar,
    SvgIcon,
    VueCountdown,
},
data() {
  const now = new Date();
  const newLaunch = Date.setDate(("May 23, 2023") + 1, 0, 1);
  console.log('newLaunch: ' + newLaunch)

    return {
       path: mdiProgressAlert,
       time: newLaunch - now,
    }
  },
}
</script>
kt-vee commented 1 year ago

Disregard - was formatting my date wrong!