Skip to content

Commit

Permalink
add docs for start of week
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceharrison1984 committed Jul 7, 2023
1 parent b9edc43 commit 4dd68e5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions apps/schedulely-docs/docs/Usage/StartOfWeek.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Start Of Week
description: Control what day of the week Schedulely starts on
---

Schedulely provides an easy way to change the day that calendar starts on.

## Usage

You will need to manually pass in the `createDefaultAdapter` to the `dateAdapter` property.

```tsx
import { Schedulely, WeekDay, createDefaultAdapter } from 'schedulely';

<Schedulely dateAdapter={createDefaultAdapter('en', Weekday.Monday)} />;
```

The calendar is setup to try it's best to wrap the trailing/leading days evenly on the top and bottom respectively. However, the top takes priority for the current month and if the month starts of the selected start of the week, you will not see trailing days from the previous month.

## Warning

It is very likely the API for changing the start of week will be changed in the future to be a bit cleaner.
1 change: 1 addition & 0 deletions apps/schedulely-docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const sidebars = {
'Usage/Actions',
'Usage/DateTime',
'Usage/Keyboard',
'Usage/StartOfWeek',
],
},
{
Expand Down

0 comments on commit 4dd68e5

Please sign in to comment.