Skip to content

Commit 1c8a4df

Browse files
committed
chore: type update
1 parent 33f0043 commit 1c8a4df

File tree

1 file changed

+8
-4
lines changed
  • src/Shared/Components/DatePicker

1 file changed

+8
-4
lines changed

src/Shared/Components/DatePicker/types.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,17 @@ export interface SingleDatePickerProps {
5050
dataTestId?: string
5151
}
5252

53+
export interface DateSelectPickerType extends SelectPickerOptionType {
54+
value: string
55+
}
56+
5357
export interface MonthlySelectProps extends Pick<SingleDatePickerProps, 'dataTestId'> {
5458
/**
5559
* Current selected date object
5660
*
5761
* @default 'new Date()'
5862
*/
59-
selectedMonthlyDate: SelectPickerOptionType
63+
selectedMonthlyDate: DateSelectPickerType
6064
/**
6165
* Onchange handle picker type
6266
*/
@@ -73,7 +77,7 @@ export interface TimeSelectProps {
7377
/**
7478
* Handler for updating the date from the parent component
7579
*/
76-
onChange: (date: SelectPickerOptionType) => void
80+
onChange: (date: DateSelectPickerType) => void
7781
/**
7882
* Props for the time picker
7983
*/
@@ -89,15 +93,15 @@ export interface TimeSelectProps {
8993
/**
9094
* Id for the component
9195
*/
92-
default12HourTime: SelectPickerOptionType
96+
default12HourTime: DateSelectPickerType
9397
/**
9498
* Data test id for time picker
9599
*/
96100
dataTestIdForTime?: string
97101
/**
98102
* To hide time selector
99103
*/
100-
selectedTimeOption: SelectPickerOptionType
104+
selectedTimeOption: DateSelectPickerType
101105
}
102106

103107
export interface DateTimePickerProps

0 commit comments

Comments
 (0)