nathanreyes / v-calendar

An elegant calendar and datepicker plugin for Vue.
https://vcalendar.io
MIT License
4.38k stars 856 forks source link

Show today's date by default in v-date-picker #343

Open luisbravo1 opened 5 years ago

luisbravo1 commented 5 years ago

I am trying to show today's date by default in the v-date-picker but I haven't found a way to do so. Is there a proper way to do it?

nathanreyes commented 5 years ago

By 'show today's date', are you saying you want the first calendar page to display by default? That should always happen.

Also, you can assign today's date as selected date with the following:

<v-date-picker v-model="date" />
export default {
  data() {
    return {
      date: new Date()
    }
  }
}

Sorry, I don't think I'm properly understanding what problem you are having.

contractorwolf commented 4 years ago

@nathanreyes how would you set a date range the same way (such as displaying what they had previously selected, i. e. store in a db)?