Skip to content

Commit 2013506

Browse files
update import and DateTimePicker docs
1 parent 175c3aa commit 2013506

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

docs/documentation/docs/controls/DateTimePicker.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Here are some examples of the control:
2727
```TypeScript
2828
import { DateTimePicker, DateConvention, TimeConvention } from '@pnp/spfx-controls-react/lib/DateTimePicker';
2929
```
30+
3031
- Use the `DateTimePicker` control in your code as follows, either as an uncontrolled or a controlled component:
3132

3233
```TypeScript
@@ -47,7 +48,6 @@ import { DateTimePicker, DateConvention, TimeConvention } from '@pnp/spfx-contro
4748

4849
The `DateTimePicker` control can be configured with the following properties:
4950

50-
5151
| Property | Type | Required | Description |
5252
| ---- | ---- | ---- | ---- |
5353
| label | string | no | Property field label displayed on top. |
@@ -72,12 +72,13 @@ 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
75+
| initialPickerDate | Date | no | The initially highlighted date in the calendar picker |
7676
| maxDate | Date | no | The maximum allowable date. |
7777
| minDate | Date | no | The minimum allowable date. |
7878
| minutesIncrementStep | MinutesIncrement | no | Specifies minutes' increment step for `TimeDisplayControlType.Dropdow` |
79-
| showClearDate | boolean | no | Controls whether the clearDate iconbutton must be available when date is selected, default to false
80-
| showClearDateIcon | string | no | Controls the icon used for clearDate iconbutton. Defaults to 'RemoveEvent'
79+
| showClearDate | boolean | no | Controls whether the clearDate iconbutton must be available when date is selected, default to false |
80+
| showClearDateIcon | string | no | Controls the icon used for clearDate iconbutton. Defaults to 'RemoveEvent' |
81+
| restrictedDates | Date[] | no | If set the Calendar will not allow selection of dates in this array. |
8182

8283
Enum `TimeDisplayControlType`
8384

@@ -112,6 +113,7 @@ Interface `IDateTimePickerStrings` extends [IDatePickerStrings](https://develope
112113
| textErrorMessage | string | no | Error message when text is entered in the date picker. |
113114

114115
Type `MinutesIncrement`
116+
115117
```typescript
116118
type MinutesIncrement = 1 | 5 | 10 | 15 | 30;
117119
```

src/controls/dateTimePicker/DateTimePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from "react";
22
import { isEqual } from '@microsoft/sp-lodash-subset';
33
import { TimeConvention, DateConvention } from "./DateTimeConventions";
4-
import { Calendar } from "@fluentui/react";
4+
import { Calendar } from "@fluentui/react/lib/Calendar";
55
import { DatePicker } from "@fluentui/react/lib/DatePicker";
66
import { Label } from "@fluentui/react/lib/Label";
77
import { IconButton } from "@fluentui/react/lib/Button";

0 commit comments

Comments
 (0)