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

Update the placeholder in DateTimePicker #503

Merged
merged 3 commits into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions docs/documentation/docs/controls/DateTimePicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ The `DateTimePicker` control can be configured with the following properties:
| showSeconds | boolean | no | Specifies, if seconds dropdown should be shown, defaults to false. |
| timeDisplayControlType | TimeDisplayControlType | no | Specifies what type of control to use when rendering time part. |
| showLabels | boolean | no | Specifies if labels in front of date and time parts should be rendered. |
| placeholder | string | no | Placeholder text for the DatePicker. |

Enum `TimeDisplayControlType`

Expand Down
2 changes: 2 additions & 0 deletions src/controls/dateTimePicker/DateTimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export class DateTimePicker extends React.Component<IDateTimePickerProps, IDateT
value = this.state.day,
strings: dateStrings = new DateTimePickerStrings(), // Defines the DatePicker control labels
timeDisplayControlType,
placeholder,
showLabels
} = this.props;

Expand Down Expand Up @@ -291,6 +292,7 @@ export class DateTimePicker extends React.Component<IDateTimePickerProps, IDateT
showGoToToday={showGoToToday}
showMonthPickerAsOverlay={showMonthPickerAsOverlay}
showWeekNumbers={showWeekNumbers}
placeholder={placeholder}
/>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/controls/dateTimePicker/IDateTimePickerProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,9 @@ export interface IDateTimePickerProps {
* Specify if labels in front of date and time parts should be rendered. True by default
*/
showLabels?: boolean;

/**
* Placeholder text for the DatePicker
*/
placeholder?: string;
}