-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac27992
commit 7058bcd
Showing
7 changed files
with
1,452 additions
and
2,481 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,33 @@ | ||
import * as React from 'react'; | ||
import { ReactDatePickerProps } from 'react-datepicker'; | ||
import { DatePickerProps as LibProps } from 'react-datepicker'; | ||
import { Moment } from 'moment'; | ||
|
||
export interface DatePickerProps { | ||
selected?: Moment | Date | null; | ||
onChange?(date: Moment | Date | null): void; | ||
startDate?: Moment | Date | null; | ||
endDate?: Moment | Date | null; | ||
minDate?: Moment | Date | null; | ||
maxDate?: Moment | Date | null; | ||
export type DatePickerProps = Omit< | ||
LibProps, | ||
'onSelect' | 'excludeScrollbar' | 'onChange' | 'selected' | 'startDate' | 'endDate' | 'minDate' | 'maxDate' | ||
> & { | ||
onSelect?: LibProps['onSelect']; | ||
excludeScrollbar?: LibProps['excludeScrollbar']; | ||
disableInlineEditing?: boolean; | ||
dts?: string; | ||
/** | ||
* "dateFormat" prop is using momentjs format tokens. | ||
* set this prop to "true" to enable unicode tokens. | ||
* read more https://git.io/fxCyr | ||
*/ | ||
disableMomentFormat?: boolean; | ||
} | ||
dateFormat?: string; | ||
dts?: string; | ||
onChange: ( | ||
date: Moment | Date | null, | ||
event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement> | ||
) => void; | ||
selected?: Moment | Date | null; | ||
startDate?: Moment | Date | null; | ||
endDate?: Moment | Date | null; | ||
minDate?: Moment | Date | null; | ||
maxDate?: Moment | Date | null; | ||
}; | ||
|
||
declare const DatePicker: React.ForwardRefExoticComponent< | ||
React.PropsWithoutRef<DatePickerProps & Omit<ReactDatePickerProps, keyof DatePickerProps>> & | ||
React.RefAttributes<((...args: any[]) => any) | Element> | ||
>; | ||
declare const DatePicker: React.FC<DatePickerProps>; | ||
|
||
export default DatePicker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters