@edvisor/product-language 0.10.54 → 0.11.1
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,4 +1,19 @@
|
|
|
1
1
|
import { FC } from '@helpers';
|
|
2
2
|
import { IDatePickerProps as IBaseProps, IDatePickerSlots } from './helpers/date-picker-factory';
|
|
3
3
|
export declare type IDatePickerProps = IBaseProps<string>;
|
|
4
|
+
/** did you know, if you need a DatePicker that takes something other than
|
|
5
|
+
* string dates, you can use the datePickerFactory? Just supply it with
|
|
6
|
+
* functions to and from your date representation, and an "empty" value for
|
|
7
|
+
* your type.
|
|
8
|
+
*
|
|
9
|
+
* For example, here's one that takes native Date objects
|
|
10
|
+
* ```
|
|
11
|
+
export const DatePicker: FC<IBaseProps<Date>, IDatePickerSlots> = datePickerFactory({
|
|
12
|
+
toDate: (date) => date,
|
|
13
|
+
fromDate: (date) => date,
|
|
14
|
+
empty: (date) => date.getTime() === 0,
|
|
15
|
+
})
|
|
16
|
+
```
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
4
19
|
export declare const DatePicker: FC<IDatePickerProps, IDatePickerSlots>;
|