Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DateInput] Add support for datepicker clearButtonText and todayButtonText props. #3020

Merged
merged 2 commits into from
Oct 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/datetime/src/dateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ export interface IDateInputProps extends IDatePickerBaseProps, IDateFormatProps,
*/
canClearSelection?: boolean;

/**
* Text for the reset button in the date picker action bar.
* Passed to `DatePicker` component.
* @default "Clear"
*/
clearButtonText?: string;

/**
* Whether the calendar popover should close when a date is selected.
* @default true
Expand Down Expand Up @@ -108,6 +115,13 @@ export interface IDateInputProps extends IDatePickerBaseProps, IDateFormatProps,
* in the input field, pass `new Date(undefined)` to the value prop.
*/
value?: Date | null;

/**
* Text for the today button in the date picker action bar.
* Passed to `DatePicker` component.
* @default "Today"
*/
todayButtonText?: string;
}

export interface IDateInputState {
Expand Down