Skip to content

Commit c6d4f76

Browse files
committed
refactor(types): make props optional
1 parent 5fd30dc commit c6d4f76

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/datepicker.d.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,135 +5,135 @@ export interface DatePickerProps {
55
* Represents the start date for a date picker.
66
* @default null
77
*/
8-
startDate: any;
8+
startDate?: any;
99

1010
/**
1111
* Represents the end date for a date picker.
1212
* @default null
1313
*/
14-
endDate: any;
14+
endDate?: any;
1515

1616
/**
1717
* Represents the start time for the date picker (in HH:mm format).
1818
* @default '00:00'
1919
*/
20-
startDateTime: string;
20+
startDateTime?: string;
2121

2222
/**
2323
* Represents the end time for the date picker (in HH:mm format).
2424
* @default '00:00'
2525
*/
26-
endDateTime: string;
26+
endDateTime?: string;
2727

2828
/**
2929
* Represents the current date.
3030
*/
31-
today: Date;
31+
today?: Date;
3232

3333
/**
3434
* Represents the default year for the date picker.
3535
*/
36-
defaultYear: number;
36+
defaultYear?: number;
3737

3838
/**
3939
* Represents the default month for the date picker.
4040
*/
41-
defaultMonth: number;
41+
defaultMonth?: number;
4242

4343
/**
4444
* Represents the start day of the week (0 for Sunday, 1 for Monday, etc.).
4545
*/
46-
startOfWeek: number;
46+
startOfWeek?: number;
4747

4848
/**
4949
* Indicates whether the date picker has multiple panes.
5050
*/
51-
isMultipane: boolean;
51+
isMultipane?: boolean;
5252

5353
/**
5454
* Indicates whether the date picker is in range mode.
5555
*/
56-
isRange: boolean;
56+
isRange?: boolean;
5757

5858
/**
5959
* Indicates whether the date picker is open.
6060
*/
61-
isOpen: boolean;
61+
isOpen?: boolean;
6262

6363
/**
6464
* Specifies the alignment of the date picker (e.g., 'left', 'center', 'right').
6565
*/
66-
align: string;
66+
align?: string;
6767

6868
/**
6969
* Represents the theme of the date picker.
7070
*/
71-
theme: string;
71+
theme?: string;
7272

7373
/**
7474
* An array of disabled dates.
7575
*/
76-
disabledDates: string[];
76+
disabledDates?: string[];
7777

7878
/**
7979
* An array of enabled dates.
8080
*/
81-
enabledDates: string[];
81+
enabledDates?: string[];
8282

8383
/**
8484
* Callback function to handle day click events.
8585
*/
86-
onDayClick: (event: Object) => void;
86+
onDayClick?: (event: Object) => void;
8787

8888
/**
8989
* Indicates whether the date picker should always be shown.
9090
*/
91-
alwaysShow: boolean;
91+
alwaysShow?: boolean;
9292

9393
/**
9494
* Indicates whether year controls are displayed in the date picker.
9595
*/
96-
showYearControls: boolean;
96+
showYearControls?: boolean;
9797

9898
/**
9999
* Indicates whether preset options are displayed in the date picker.
100100
*/
101-
showPresets: boolean;
101+
showPresets?: boolean;
102102

103103
/**
104104
* Indicates whether the time picker is shown in the date picker.
105105
*/
106-
showTimePicker: boolean;
106+
showTimePicker?: boolean;
107107

108108
/**
109109
* Indicates whether future dates are enabled.
110110
*/
111-
enableFutureDates: boolean;
111+
enableFutureDates?: boolean;
112112

113113
/**
114114
* Indicates whether past dates are enabled.
115115
*/
116-
enablePastDates: boolean;
116+
enablePastDates?: boolean;
117117

118118
/**
119119
* An array of preset date range labels.
120120
*/
121-
presetLabels: string[];
121+
presetLabels?: string[];
122122

123123
/**
124124
* An array of preset date ranges with labels and start/end timestamps.
125125
*/
126-
presetRanges: Object[];
126+
presetRanges?: Object[];
127127

128128
/**
129129
* An array of day-of-week labels.
130130
*/
131-
dowLabels: string[];
131+
dowLabels?: string[];
132132

133133
/**
134134
* An array of month labels.
135135
*/
136-
monthLabels: string[];
136+
monthLabels?: string[];
137137
}
138138

139139
export interface DatePickerEvents {

0 commit comments

Comments
 (0)