diff --git a/packages/react/src/components/DatePicker/DatePicker.tsx b/packages/react/src/components/DatePicker/DatePicker.tsx index 518407b107fb..d48cf5202039 100644 --- a/packages/react/src/components/DatePicker/DatePicker.tsx +++ b/packages/react/src/components/DatePicker/DatePicker.tsx @@ -28,6 +28,7 @@ import { usePrefix } from '../../internal/usePrefix'; import { useSavedCallback } from '../../internal/useSavedCallback'; import { FormContext } from '../FluidForm'; import { WarningFilled, WarningAltFilled } from '@carbon/icons-react'; +import { DateLimit, DateOption } from 'flatpickr/dist/types/options'; // Weekdays shorthand for english locale l10n.en.weekdays.shorthand.forEach((_day, index) => { @@ -243,12 +244,12 @@ interface DatePickerProps { /** * The flatpickr `disable` option that allows a user to disable certain dates. */ - disable?: string[]; + disable?: DateLimit[]; /** * The flatpickr `enable` option that allows a user to enable certain dates. */ - enable?: string[]; + enable?: DateLimit[]; /** * The flatpickr `inline` option. @@ -342,12 +343,12 @@ interface DatePickerProps { /** * The maximum date that a user can pick to. */ - maxDate?: string | number; + maxDate?: DateOption; /** * The minimum date that a user can start picking from. */ - minDate?: string | number; + minDate?: DateOption; /** * The `change` event handler.