Skip to content

FIX: sync rawValue and input display for DatePicker when d_value changes via Form initialValues#8526

Open
Trandx wants to merge 1 commit intoprimefaces:masterfrom
Trandx:DatePicker_rawValue
Open

FIX: sync rawValue and input display for DatePicker when d_value changes via Form initialValues#8526
Trandx wants to merge 1 commit intoprimefaces:masterfrom
Trandx:DatePicker_rawValue

Conversation

@Trandx
Copy link
Copy Markdown

@Trandx Trandx commented Apr 9, 2026

When using a DatePicker component inside a PrimeVue Form component with initialValues, the input field remains visually empty even though the form state internally holds the correct value. The value is correctly passed, and other field types (e.g. InputText) populate as expected.

This is a regression: the same setup works correctly in version 4.3.1 but fails in 4.5.0 and above (confirmed on 4.5.5).

Root cause (identified via source analysis): DatePicker maintains its own internal rawValue state that drives the visible input. When BaseEditableHolder sets d_value via the $formDefaultValue watcher, it does not trigger the modelValue watcher in DatePicker, so rawValue is never updated and the <input> element retains an empty display value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant