Skip to content

Commit a90ed86

Browse files
Merge pull request #1581 from RicoNL/datepicker-initialdate
DateTimePicker: initialPickerDate
2 parents 31b03c4 + 42799e8 commit a90ed86

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

docs/documentation/docs/controls/DateTimePicker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ The `DateTimePicker` control can be configured with the following properties:
7272
| timeDisplayControlType | TimeDisplayControlType | no | Specifies what type of control to use when rendering time part. |
7373
| showLabels | boolean | no | Specifies if labels in front of date and time parts should be rendered. |
7474
| placeholder | string | no | Placeholder text for the DatePicker. |
75+
| initialPickerDate | Date | no | The initially highlighted date in the calendar picker
7576
| maxDate | Date | no | The maximum allowable date. |
7677
| minDate | Date | no | The minimum allowable date. |
7778
| minutesIncrementStep | MinutesIncrement | no | Specifies minutes' increment step for `TimeDisplayControlType.Dropdow` |

src/controls/dateTimePicker/DateTimePicker.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ export class DateTimePicker extends React.Component<IDateTimePickerProps, IDateT
241241
timeDisplayControlType,
242242
placeholder,
243243
showLabels,
244+
initialPickerDate,
244245
minDate,
245246
maxDate,
246247
minutesIncrementStep,
@@ -337,6 +338,7 @@ export class DateTimePicker extends React.Component<IDateTimePickerProps, IDateT
337338
showMonthPickerAsOverlay={showMonthPickerAsOverlay}
338339
showWeekNumbers={showWeekNumbers}
339340
placeholder={placeholder}
341+
initialPickerDate={initialPickerDate}
340342
minDate={minDate}
341343
maxDate={maxDate}
342344
textField={{

src/controls/dateTimePicker/IDateTimePickerProps.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,13 @@ export interface IDateTimePickerProps {
124124
placeholder?: string;
125125

126126
/**
127-
* The minimum allowable date for the DatePicker
127+
* The initial selected date
128128
*/
129+
initialPickerDate?: Date;
129130

131+
/**
132+
* The minimum allowable date for the DatePicker
133+
*/
130134
minDate?: Date;
131135

132136
/**

0 commit comments

Comments
 (0)