vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report][3.4.0] Problem displaying <v-date-picker>, it does not appear by default on the allowed dates

Open alanscordoba opened this issue 1 year ago • 6 comments

Environment

Vuetify Version: 3.4.0 Vue Version: 3.3.8 Browsers: Chrome 119.0.0.0 OS: Windows 10, Windows

Steps to reproduce

Just view the sample example

Expected Behavior

In the example it appears in the month of November.

Actual Behavior

I hope it appears in December, since there are no dates available in November, and also the date initially selected is also in that month.

Reproduction Link

https://play.vuetifyjs.com/#...

alanscordoba avatar Nov 13 '23 11:11 alanscordoba

The problem seems to be with the date format you passed. It is invalid. It works when i pass the valid date like below -

Invalid - const datePicker = ref(new Date('2023/12/10T00:00:00-03:00')) Valid - const datePicker = ref(new Date('2023-12-10T00:00:00-03:00'))

Here is the working example

Mohib834 avatar Nov 13 '23 11:11 Mohib834

Thanks for your response, but in my environment it doesn't work, since the data comes from an API. I'll try to explain it:

datePicker is initialized as const datePicker = ref()

Then, the data coming from the API is loaded. At that time when is initialized to the current month instead of the selected month based on the v-model date.

alanscordoba avatar Nov 13 '23 13:11 alanscordoba

Here is an example of how to do it:

https://play.vuetifyjs.com/#eNpdkM2KgzAUhV/lko0tNJrqLAaxAwN9gFnMru0ioymE0SQkqRVK3703avEHQn7O/c4l554exNky+TYmbm+C5KTwojE19+LrrACKlnJj+mv/KLXyXCphR6kXK6SpkeW/sG8VoKWNrkR9OJNQ/hmqZKrnvK71XVS92wVMcneUzmgl/2rhFmwjFRK4L1XeBZV3k5q8v5qs/xqUIUqRzCLi05VWGg9O+NuQVDZGWw8PsOIKT7ha3UCE04kCDoB9nYcpFRwCuFHiDkcUN1HK0ozuU7pnv4zl/aIswz3abqcGmGZ0zgzRHODdGkgXwGpiI3yat9vB3HtBc5EMeTEpee5IFmfxJwnnR8zI5QWGtpym

If you have any questions, please reach out to us in our Discord community.

johnleider avatar Nov 13 '23 21:11 johnleider

Sorry to insist on this topic, but I think it is a bug, the component is not displayed correctly. I pass the link to play it, if you press the button you will see that the calendar appears, it is not displayed in the month of December, as expected, thank you:

Demonstration

I clarify that it is also happening in version 3.4.1

alanscordoba avatar Nov 15 '23 12:11 alanscordoba

Sorry to insist on this topic, but I think it is a bug, the component is not displayed correctly. I pass the link to play it, if you press the button you will see that the calendar appears, it is not displayed in the month of December, as expected, thank you:

Demonstration

I clarify that it is also happening in version 3.4.1

Addressed in https://github.com/vuetifyjs/vuetify/commit/6901d24e0397c7d4cf95c2f42f9e421e6070a9c9

johnleider avatar Nov 16 '23 20:11 johnleider

This problem had been resolved in 3.4.3, but reappeared in 3.4.8 and is maintained in subsequent versions.

alanscordoba avatar Jan 12 '24 12:01 alanscordoba