-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
When I use the datepicker inside a form and I try to apply the initial values to it using a reactive object, it applies to the field without the proper formatting.
This only happens if the initialization of the value is using the initial value of an enclosing form component.
Here's the page where I found this problem in my OSS project: https://github.com/web-budget/front-end/blob/main/src/views/registration/financial-periods/FinancialPeriodFormView.vue#L93
Pull Request Link
No response
Reason for not contributing a PR
- Lack of time
- Unsure how to implement the fix/feature
- Difficulty understanding the codebase
- Other
Other Reason
No response
Reproducer
https://stackblitz.com/edit/b5fgb3x3?file=src%2FApp.vue
Environment
Web application
Vue version
4.5.4
PrimeVue version
3.5.25
Node version
22.13.1
Browser(s)
Edge 143.0.3650.139
Steps to reproduce the behavior
- Add a datepicker to a form
- Initialize it using the initial values of the form
- The value will be without formating
- Click in the field and select a new value from the drop down
- The value will be formatted
Expected behavior
When you apply the value using the initial values it should behave the same way when you apply using v-model for example, respecting the format defined in the date format property