From c30bba0a1a248e6e068daf722e2656f5c90e2552 Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Mon, 13 Jan 2025 00:58:24 +0000 Subject: [PATCH] Fixed #6780 - DynamicForm: DatePicker (range) not working --- packages/primevue/src/datepicker/style/DatePickerStyle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/primevue/src/datepicker/style/DatePickerStyle.js b/packages/primevue/src/datepicker/style/DatePickerStyle.js index 1ce0b1ea5..2102ac811 100644 --- a/packages/primevue/src/datepicker/style/DatePickerStyle.js +++ b/packages/primevue/src/datepicker/style/DatePickerStyle.js @@ -451,11 +451,11 @@ const classes = { 'p-datepicker-today': date.today } ], - day: ({ instance, props, date }) => { + day: ({ instance, props, state, date }) => { let selectedDayClass = ''; if (instance.isRangeSelection() && instance.isSelected(date) && date.selectable) { - selectedDayClass = instance.isDateEquals(props.modelValue[0], date) || instance.isDateEquals(props.modelValue[1], date) ? 'p-datepicker-day-selected' : 'p-datepicker-day-selected-range'; + selectedDayClass = instance.isDateEquals(state.d_value[0], date) || instance.isDateEquals(state.d_value[1], date) ? 'p-datepicker-day-selected' : 'p-datepicker-day-selected-range'; } return [