@@ -98,7 +98,7 @@ withCalendarState(composeCalendar(
98
98
))
99
99
```
100
100
101
- #### Building a custom calendar
101
+ ### Building a custom calendar
102
102
103
103
A custom calendar can be created by swapping out any default component for an alternative:
104
104
@@ -148,7 +148,7 @@ withCalendarState(composeCalendar(
148
148
> implements the same API (props see below) and provides all the relevant accessibility
149
149
> properties, such as ARIA attributes and ` tabIndex ` .
150
150
151
- ### Props
151
+ ## Props
152
152
153
153
| Property | PropType | Required | Default Value |
154
154
| --------------------- | -------------------- | -------- | ---------------- |
@@ -171,7 +171,7 @@ withCalendarState(composeCalendar(
171
171
172
172
Some of the more complex props and props for sub-components are detailed below.
173
173
174
- #### BpkCalendarNav
174
+ ### BpkCalendarNav
175
175
176
176
The BpkCalendarNav component is used to change the month that is being displayed by using
177
177
buttons and a select box.
@@ -186,7 +186,7 @@ buttons and a select box.
186
186
| month | Date | true | - |
187
187
| onMonthChange | func | false | null |
188
188
189
- #### BpkCalendarGridHeader
189
+ ### BpkCalendarGridHeader
190
190
191
191
The BpkCalendarGridHeader component displays the header of ` BpkCalendarGrid ` , listing
192
192
the days of the week. This is needed as a separate component, as the header should stay
@@ -199,7 +199,7 @@ in place while the rest of the grid transitions when changing months.
199
199
| weekStartsOn | number | true | - |
200
200
| showWeekendSeparator | bool | false | false |
201
201
202
- #### BpkCalendarGrid
202
+ ### BpkCalendarGrid
203
203
204
204
The BpkCalendarGrid component displays a month as a table.
205
205
@@ -223,7 +223,7 @@ The BpkCalendarGrid component displays a month as a table.
223
223
| showWeekendSeparator | bool | false | true |
224
224
| weekStartsOn | number | false | 1 |
225
225
226
- #### BpkCalendarDate
226
+ ### BpkCalendarDate
227
227
228
228
The BpkCalendarDate component is used to render the content of a cell
229
229
(a single day) inside the calendar grid.
@@ -241,9 +241,9 @@ The BpkCalendarDate component is used to render the content of a cell
241
241
| onDateKeyDown | func | false | null |
242
242
| preventKeyboardFocus | bool | false | true |
243
243
244
- #### Prop details
244
+ ### Prop details
245
245
246
- ##### daysOfWeek
246
+ #### daysOfWeek
247
247
248
248
An array of objects describing the days of the week:
249
249
@@ -271,14 +271,14 @@ An array of objects describing the days of the week:
271
271
]
272
272
```
273
273
274
- ##### fixedWidth
274
+ #### fixedWidth
275
275
276
276
If set to true (default), it sets a fixed width on the calendar container. This is necessary to support
277
277
transitions and to create the right size for the Datepicker component.
278
278
279
279
If set to false, the calendar is of fluid width and will take up the space of its parent container.
280
280
281
- ##### formatDateFull
281
+ #### formatDateFull
282
282
283
283
A function to format a full, human-readable date, for example: "Friday, 13th January 2017":
284
284
@@ -288,7 +288,7 @@ import format from 'date-fns/format';
288
288
const formatDateFull = date => format (date, ' dddd, Do MMMM YYYY' );
289
289
```
290
290
291
- ##### formatMonth
291
+ #### formatMonth
292
292
293
293
A function to format a human-readable month, for example: "January 2017":
294
294
@@ -300,6 +300,6 @@ import format from 'date-fns/format';
300
300
const formatMonth = date => format (date, ' MMMM YYYY' );
301
301
```
302
302
303
- ##### weekStartsOn
303
+ #### weekStartsOn
304
304
305
305
First day of the week. 0 = Sunday, 1 = Monday, ..., 6 = Saturday.
0 commit comments