praveenpuglia / vuetify-daterange-picker

The missing date range picker for Vuetify JS you have been looking for.
https://vuetify-daterange-picker.gitbook.io/docs
MIT License
197 stars 59 forks source link

Presents don't show in UI #54

Closed timothymarois closed 5 years ago

timothymarois commented 5 years ago

Not sure if this has been updated with the latest Vueify, I have noticed the calendar itself is changed compared to the examples of this plugin.

Passing in presets seems to do nothing in the Date range UI under presets div.

presets: [
                    {
                        label: 'Today',
                        range: [
                            format(new Date(), 'YYYY-MM-DD'),
                            format(new Date(), 'YYYY-MM-DD'),
                        ],
                    },
                    {
                        label: 'Yesterday',
                        range: [
                            format(subDays(new Date(), 1), 'YYYY-MM-DD'),
                            format(subDays(new Date(), 1), 'YYYY-MM-DD'),
                        ],
                    },
                    {
                        label: 'Last 30 Days',
                        range: [
                            format(subDays(new Date(), 30), 'YYYY-MM-DD'),
                            format(subDays(new Date(), 1), 'YYYY-MM-DD'),
                        ],
                    },
                ],

The presets list doesn't show any. Using exact code from examples. And this could be due to the lack of documentation, but this package so far isn't usable out of the box.

<VDaterange :options="dateRangeOptions" @input="onDateRangeChange" />
praveenpuglia commented 5 years ago

I think you are looking at the old version. Can you please passing the presets as mentioned here?

https://vuetify-daterange-picker.gitbook.io/docs/api#presets

earlier, everything was a giant options object but now all of the props are separated for better control.