Skip to content

Commit

Permalink
fix: missing types of datepicker (#16334)
Browse files Browse the repository at this point in the history
Co-authored-by: Nikhil Tomar <63502271+2nikhiltom@users.noreply.github.com>
  • Loading branch information
riddhybansal and 2nikhiltom committed May 7, 2024
1 parent ca9e930 commit dbb24d3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/react/src/components/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -243,12 +244,12 @@ interface DatePickerProps {
/**
* The flatpickr `disable` option that allows a user to disable certain dates.
*/
disable?: string[];
disable?: DateLimit<DateOption>[];

/**
* The flatpickr `enable` option that allows a user to enable certain dates.
*/
enable?: string[];
enable?: DateLimit<DateOption>[];

/**
* The flatpickr `inline` option.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit dbb24d3

Please sign in to comment.