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

Calendar: Invalid typings for modelValue. #3609

Closed
Magiczne opened this issue Jan 30, 2023 · 0 comments · Fixed by #4972 or DallinAllred/ezanalytics#11
Closed

Calendar: Invalid typings for modelValue. #3609

Magiczne opened this issue Jan 30, 2023 · 0 comments · Fixed by #4972 or DallinAllred/ezanalytics#11
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Magiczne
Copy link
Contributor

Magiczne commented Jan 30, 2023

Describe the bug

type CalendarValueType = string | Date | string[] | Date[] | undefined;

Calendar allows null values. For example range input allows array with one value date and second value null. Event official documentation uses nulls.

This type should be probably rewritten as so:

type CalendarValueType = string | Date | [string, string] | [Date, Date] | [Date, null] | null

to

  1. Support nulls
  2. Only allow arrays with size of 2.

Reproducer

https://codesandbox.io/p/sandbox/vite-primevue-forked-2mhcvu?file=%2Fsrc%2FApp.vue

PrimeVue version

3.22.4

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@Magiczne Magiczne added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 30, 2023
Magiczne added a commit to Magiczne/primevue that referenced this issue Dec 16, 2023
Magiczne added a commit to Magiczne/primevue that referenced this issue Jan 20, 2024
Magiczne added a commit to Magiczne/primevue that referenced this issue Jan 20, 2024
Magiczne added a commit to Magiczne/primevue that referenced this issue Jan 20, 2024
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 25, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.51.0 milestone Mar 25, 2024
tugcekucukoglu added a commit that referenced this issue Mar 25, 2024
Fixes #3609 - Update Calendar typings to be precise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
2 participants