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

DatePicker: switching to year view when modelValue is populated #6203

Closed
veco9 opened this issue Aug 8, 2024 · 1 comment · Fixed by #6204
Closed

DatePicker: switching to year view when modelValue is populated #6203

veco9 opened this issue Aug 8, 2024 · 1 comment · Fixed by #6204
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@veco9
Copy link

veco9 commented Aug 8, 2024

Describe the bug

It is not possible to switch to year picker when modelValue is populated (not empty).

Reproducer

https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-djt24u?file=src%2FApp.vue,src%2Fmain.ts

PrimeVue version

4.0.4

Vue version

4.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome 126.0.6478.114 (64-bit)

Steps to reproduce the behavior

  1. Create basic datepicker in dom via (or go to https://primevue.org/datepicker/ under "Basic")
  2. Click on input and select some date
  3. Click on input once again and click on year shown as YYYY (to show year picker)
  4. Errors pops in console and year picker is not shown. Error:
    ReferenceError: value is not defined
    at Proxy.isYearSelected ....

Expected behavior

Year picker should be shown when clicking on year (e.g. 2024) regardless of modelValue being populated.

@veco9 veco9 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 8, 2024
@avramz
Copy link
Contributor

avramz commented Aug 8, 2024

Can reproduce, fix pending in PR

tugcekucukoglu pushed a commit that referenced this issue Aug 21, 2024
* #6203 fix: switching to year view when modelValue is populated

* - remove debug
@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 Aug 21, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.0.5 milestone Aug 21, 2024
LeaderbotX400 pushed a commit to LeaderbotX400/primevue that referenced this issue Aug 29, 2024
…ted (primefaces#6204)

* primefaces#6203 fix: switching to year view when modelValue is populated

* - remove debug
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
Development

Successfully merging a pull request may close this issue.

3 participants