Skip to content

Commit fdb5f27

Browse files
committed
feat(PrimeDatePicker): add updateModelType prop for enhanced model binding
1 parent 32f080e commit fdb5f27

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/components/PrimeDatePicker.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export interface FormKitPrimeDatePickerProps {
5050
ptOptions?: DatePickerProps['ptOptions']
5151
unstyled?: DatePickerProps['unstyled']
5252
size?: DatePickerProps['size']
53+
updateModelType?: DatePickerProps['updateModelType']
5354
}
5455
5556
const props = defineProps({
@@ -138,6 +139,7 @@ function handleSelect(e: any) {
138139
:pt="context?.pt"
139140
:pt-options="context?.ptOptions"
140141
:unstyled="unstyled"
142+
:update-model-type="context?.updateModelType ?? 'date'"
141143
@date-select="handleSelect"
142144
@blur="handleBlur"
143145
@clear-click="handleClearClick"

src/definitions/input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const primeListboxDefinition: FormKitTypeDefinition = createInput(PrimeLi
8484
})
8585

8686
export const primeDatePickerDefinition: FormKitTypeDefinition = createInput(PrimeDatePicker, {
87-
props: ['dateFormat', 'placeholder', 'selectionMode', 'inline', 'icon', 'showOtherMonths', 'selectOtherMonths', 'showIcon', 'previousIcon', 'nextIcon', 'incrementIcon', 'decrementIcon', 'numberOfMonths', 'responsiveOptions', 'view', 'touchUI', 'minDate', 'maxDate', 'disabledDates', 'disabledDays', 'maxDateCount', 'showOnFocus', 'autoZIndex', 'baseZIndex', 'showButtonBar', 'showTime', 'timeOnly', 'shortYearCutoff', 'hourFormat', 'stepHour', 'stepMinute', 'stepSecond', 'showSeconds', 'hideOnDateTimeSelect', 'hideOnRangeSelection', 'timeSeparator', 'showWeek', 'manualInput', 'appendTo', 'panelStyle', 'panelClass', 'pt', 'ptOptions', 'unstyled', 'size'],
87+
props: ['dateFormat', 'placeholder', 'selectionMode', 'inline', 'icon', 'showOtherMonths', 'selectOtherMonths', 'showIcon', 'previousIcon', 'nextIcon', 'incrementIcon', 'decrementIcon', 'numberOfMonths', 'responsiveOptions', 'view', 'touchUI', 'minDate', 'maxDate', 'disabledDates', 'disabledDays', 'maxDateCount', 'showOnFocus', 'autoZIndex', 'baseZIndex', 'showButtonBar', 'showTime', 'timeOnly', 'shortYearCutoff', 'hourFormat', 'stepHour', 'stepMinute', 'stepSecond', 'showSeconds', 'hideOnDateTimeSelect', 'hideOnRangeSelection', 'timeSeparator', 'showWeek', 'manualInput', 'appendTo', 'panelStyle', 'panelClass', 'pt', 'ptOptions', 'unstyled', 'size', 'updateModelType'],
8888
family: 'PrimeInput',
8989
})
9090

0 commit comments

Comments
 (0)