diff --git a/packages/js/components/changelog/update-date-time-picker-control-onchange b/packages/js/components/changelog/update-date-time-picker-control-onchange new file mode 100644 index 00000000000..21e87a4f6b3 --- /dev/null +++ b/packages/js/components/changelog/update-date-time-picker-control-onchange @@ -0,0 +1,4 @@ +Significance: minor +Type: tweak + +Fix DateTimePickerControl's onChange date arg to only be a string (TypeScript). diff --git a/packages/js/components/src/date-time-picker-control/date-time-picker-control.tsx b/packages/js/components/src/date-time-picker-control/date-time-picker-control.tsx index f7d82d550d1..3086d407862 100644 --- a/packages/js/components/src/date-time-picker-control/date-time-picker-control.tsx +++ b/packages/js/components/src/date-time-picker-control/date-time-picker-control.tsx @@ -20,7 +20,7 @@ export type DateTimePickerControlProps = { disabled?: boolean; is12Hour?: boolean; onChange: ( date: string ) => void; -} & React.HTMLAttributes< HTMLDivElement >; +} & Omit< React.HTMLAttributes< HTMLDivElement >, 'onChange' >; export const DateTimePickerControl: React.FC< DateTimePickerControlProps > = ( { currentDate,