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

DynamicForm: DatePicker (range) not working #6780

Closed
raizdev opened this issue Nov 13, 2024 · 1 comment
Closed

DynamicForm: DatePicker (range) not working #6780

raizdev opened this issue Nov 13, 2024 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@raizdev
Copy link

raizdev commented Nov 13, 2024

Describe the bug

I am receiving the following error while trying to set range datepicker in dynamic form.

const fields = reactive({
  date: {
    label: 'Datum',
    as: 'DatePicker',
    selectionMode: 'range',
    schema: z.array(),
  },
});

Attachted example
https://stackblitz.com/edit/kcjndv?file=src%2FApp.vue

[Vue warn]: Unhandled error during execution of component update
at <DatePicker id=undefined name="date" class="w-full" ... >
at <DynamicFormControl ref_for=true as="DatePicker" selectionMode="range" ... >
at
at
at <Form initialValues= {name: '', date: ''} resolver=fn onSubmit=fn ... >
at <DynamicForm fields= {name: {…}, date: {…}} onSubmit=fn >
at <BaseTransition onEnter=fn onAfterEnter=fn onBeforeLeave=fn ... >
at <Transition name="p-drawer" onEnter=fn onAfterEnter=fn ... >
at
at <Drawer visible=true onUpdate:visible=fn header="Werkmap toevoegen" ... >
at
at <AppLayout onVnodeUnmounted=fn ref=Ref< Proxy(Object) {__v_skip: true} > >
at
at
warn$1 @ runtime-core.esm-bundler.js:51
logError @ runtime-core.esm-bundler.js:263
handleError @ runtime-core.esm-bundler.js:255
callWithErrorHandling @ runtime-core.esm-bundler.js:201
flushJobs @ runtime-core.esm-bundler.js:408
Promise.then
queueFlush @ runtime-core.esm-bundler.js:322
queueJob @ runtime-core.esm-bundler.js:317
baseWatchOptions.scheduler @ runtime-core.esm-bundler.js:6168
effect2.scheduler @ reactivity.esm-bundler.js:1826
trigger @ reactivity.esm-bundler.js:250
endBatch @ reactivity.esm-bundler.js:308
trigger @ reactivity.esm-bundler.js:721
set @ reactivity.esm-bundler.js:1003
set @ runtime-core.esm-bundler.js:3110
writeValue @ BaseEditableHolder.vue:81
updateModel @ DatePicker.vue:1238
selectDate @ DatePicker.vue:1226
onDateSelect @ DatePicker.vue:1162
onClick @ DatePicker.vue:230
callWithErrorHandling @ runtime-core.esm-bundler.js:199
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:206
invoker @ runtime-dom.esm-bundler.js:722
Show 22 more frames
Show less
DatePickerStyle.js:457 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0')
at day (DatePickerStyle.js:457:60)
at resolve (resolve.ts:4:30)
at getKeyValue (getKeyValue.ts:9:48)
at Proxy._getOptionValue (BaseComponent.vue:212:20)
at Proxy.cx (BaseComponent.vue:300:44)
at DatePicker.vue:229:63
at renderList (runtime-core.esm-bundler.js:2867:16)
at DatePicker.vue:255:49
at renderList (runtime-core.esm-bundler.js:2867:16)
at DatePicker.vue:256:45

Reproducer

https://stackblitz.com/edit/kcjndv?file=src%2FApp.vue

PrimeVue version

4.1.2

Vue version

4.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@raizdev raizdev added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 13, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.3.0 milestone Nov 26, 2024
@tugcekucukoglu tugcekucukoglu added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 26, 2024
@mertsincan mertsincan modified the milestones: 4.3.1, 4.3.0 Jan 6, 2025
@mertsincan mertsincan moved this to Review in PrimeVue Jan 6, 2025
@mertsincan mertsincan self-assigned this Jan 6, 2025
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeVue Jan 13, 2025
@Milos5611
Copy link

Milos5611 commented Jan 29, 2025

What is going on with this issue? I have the same problem. Or how should we overcome this issue?

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Feb 5, 2025
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
Status: Done
Development

No branches or pull requests

4 participants