From 4dd68e5f39d8ab71cc3e919bc1defe4bffbbc1b8 Mon Sep 17 00:00:00 2001 From: Bruce Harrison Date: Fri, 7 Jul 2023 16:52:28 -0500 Subject: [PATCH] add docs for start of week --- .../schedulely-docs/docs/Usage/StartOfWeek.md | 22 +++++++++++++++++++ apps/schedulely-docs/sidebars.js | 1 + 2 files changed, 23 insertions(+) create mode 100644 apps/schedulely-docs/docs/Usage/StartOfWeek.md diff --git a/apps/schedulely-docs/docs/Usage/StartOfWeek.md b/apps/schedulely-docs/docs/Usage/StartOfWeek.md new file mode 100644 index 0000000..8809deb --- /dev/null +++ b/apps/schedulely-docs/docs/Usage/StartOfWeek.md @@ -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'; + +; +``` + +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. diff --git a/apps/schedulely-docs/sidebars.js b/apps/schedulely-docs/sidebars.js index 34350e1..39455cd 100644 --- a/apps/schedulely-docs/sidebars.js +++ b/apps/schedulely-docs/sidebars.js @@ -36,6 +36,7 @@ const sidebars = { 'Usage/Actions', 'Usage/DateTime', 'Usage/Keyboard', + 'Usage/StartOfWeek', ], }, {