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

[Bug Report][3.5.3] (VDatePicker) Improper month text format when using Luxon 3rd party adapter #19196

Closed
MichaelGoff opened this issue Feb 8, 2024 · 1 comment
Assignees
Labels
C: VDatePicker VDatePicker T: bug Functionality that does not work as intended/expected
Milestone

Comments

@MichaelGoff
Copy link

Environment

Vuetify Version: 3.5.3
Vue Version: 3.4.7
Browsers: Chrome 121.0.0.0
OS: Windows 10

Steps to reproduce

Insert a date picker with the luxon adapter passed into the vuetify constructor.

Expected Behavior

Month text has a valid format

Actual Behavior

Month text displays "Invalid DateTime"

Reproduction Link

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

Other comments

The issue comes from the text computed. Luxon is expecting ISO-8601 formatting so the month needs a leading 0 for single digit months.

const text = computed(() => {
      return adapter.format(
        adapter.parseISO(`${year.value}-${month.value + 1}-01`),
        'monthAndYear',
      )
    })
@MichaelGoff
Copy link
Author

I will have a fix PR shortly

MichaelGoff added a commit to MichaelGoff/vuetify that referenced this issue Feb 8, 2024
Fixes "Improper DateTime" error on month text when using Luxon adapter library

fixes vuetifyjs#19196
@johnleider johnleider added T: bug Functionality that does not work as intended/expected C: VDatePicker VDatePicker labels Feb 12, 2024
@KaelWD KaelWD self-assigned this Feb 14, 2024
@KaelWD KaelWD added this to the v3.5.x milestone Feb 14, 2024
@KaelWD KaelWD closed this as completed in 0f6850c Feb 14, 2024
VIXI0 pushed a commit to VIXI0/vuetify that referenced this issue Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VDatePicker VDatePicker T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants