schummar-table 0.29.3 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { CommonFilterProps } from '../types';
|
|
3
3
|
import type { DatePickerProps, DateRange } from './datePicker';
|
|
4
|
-
export declare function DateFilter<T, V>({ locale, firstDayOfWeek, defaultDateInView, quickOptions, singleSelect, filterBy, ...props }: {
|
|
4
|
+
export declare function DateFilter<T, V>({ locale, firstDayOfWeek, defaultDateInView, quickOptions, singleSelect, filterBy, minDate, maxDate, ...props }: {
|
|
5
5
|
/** If enabled, only single days can be selected. Ranges otherwise. */
|
|
6
6
|
singleSelect?: boolean;
|
|
7
|
-
} & Pick<DatePickerProps, 'locale' | 'firstDayOfWeek' | 'defaultDateInView' | 'quickOptions'> & CommonFilterProps<T, V, Date | DateRange | null, Date | DateRange | null>): JSX.Element;
|
|
7
|
+
} & Pick<DatePickerProps, 'locale' | 'firstDayOfWeek' | 'defaultDateInView' | 'quickOptions' | 'minDate' | 'maxDate'> & CommonFilterProps<T, V, Date | DateRange | null, Date | DateRange | null>): JSX.Element;
|
|
@@ -24,6 +24,8 @@ export type DatePickerProps = {
|
|
|
24
24
|
defaultDateInView?: Date;
|
|
25
25
|
/** Show buttons to quickly select suggested dates or date ranges */
|
|
26
26
|
quickOptions?: DatePickerQuickOption[];
|
|
27
|
+
minDate?: Date;
|
|
28
|
+
maxDate?: Date;
|
|
27
29
|
};
|
|
28
30
|
/** Rounds a date down to the start of the day. */
|
|
29
31
|
export declare const startOfDay: (d: Date) => Date;
|
|
@@ -62,4 +64,5 @@ export declare const commonQuickOptions: {
|
|
|
62
64
|
};
|
|
63
65
|
/** Returns whether two dates and/or date ranges intersect. Intersection is considered per day. */
|
|
64
66
|
export declare function dateIntersect(a: Date | null | DateRange, b: Date | null | DateRange): boolean;
|
|
67
|
+
export declare function dateClamp(date: Date, min?: Date, max?: Date): Date;
|
|
65
68
|
export declare function DatePicker(props: DatePickerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|