-
-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: gpbl <[email protected]>
- Loading branch information
Showing
40 changed files
with
1,070 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Changelog | ||
|
||
Full release notes at https://github.com/gpbl/react-day-picker/releases | ||
See [Releases on Github](https://github.com/gpbl/react-day-picker/releases). |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
sort: 10 | ||
section: Introduction | ||
title: Changelog | ||
--- | ||
|
||
<Callout>This page is a work in progress</Callout> | ||
|
||
%include ../CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
sort: 2 | ||
--- | ||
|
||
_Introduction_ | ||
|
||
# Installation | ||
|
||
DayPicker is available as `react-day-picker` npm package. It requires [date-fns](https://date-fns.org) as a peer dependency. | ||
|
||
<Callout> | ||
There's an [ongoing | ||
discussion](https://github.com/gpbl/react-day-picker/discussions/1087) to | ||
support other date libraries. | ||
</Callout> | ||
|
||
## Install from npm | ||
|
||
```sh | ||
$ npm install react-day-picker date-fns | ||
``` | ||
|
||
## Basic Usage | ||
|
||
To start using DayPicker, import the `<DayPicker />` component and its default style. Assign the `selected` and `onSelect` props to manage the selected date. | ||
|
||
```tsx title="App.jsx" caption="render:Start" | ||
import "react-day-picker/style.css"; // Import the default style | ||
import { DayPicker } from "react-day-picker"; | ||
|
||
import { useState } from "react"; | ||
|
||
export function App() { | ||
const [selected, setSelected] = useState(); | ||
|
||
return ( | ||
<div role="application" aria-label="Date Picker"> | ||
<DayPicker mode="single" selected={selected} onSelect={setSelected} /> | ||
</div> | ||
); | ||
} | ||
``` | ||
|
||
## Getting Started | ||
|
||
Get started with DayPicker by reading the following guides. | ||
|
||
- [DayPicker Anatomy](/docs/using-daypicker/anatomy) - Learn about the different parts of the DayPicker component. | ||
|
||
### Using DayPicker | ||
|
||
- [Customization Props](/docs/using-daypicker/customization-props) - Read about the options available to customize the calendar and the months navigation. | ||
- [Selection Modes](/docs/using-daypicker/selection-modes) - Allow users to select days by enabling single, multiple or range selections. | ||
- [Styling](/docs/using-daypicker/styling) - Change the style to make DayPicker match your app's look and feel. | ||
- [Localization](/docs/using-daypicker/localization) - Configure DayPicker to display the calendar in different languages and date formats. | ||
- [Accessible Date Pickers](/accessibility) - Make your date picker accessible to all users, including those using screen readers. | ||
- [DayPicker Playground](/playground) - Play with the props to try the different customization options. | ||
|
||
### Advanced Guides | ||
|
||
- [Input Fields](/advanced-guides/input-fields) - Learn how to use DayPicker with input fields and form libraries. | ||
- [Custom Selections](/advanced-guides/custom-selections) - Create custom selection rules. | ||
- [Custom Components](/advanced-guides/custom-components) - Use custom components to create a fully customized date picker. | ||
- [Custom Modifiers](/advanced-guides/custom-modifiers) - Create custom modifiers to highlight specific days in the calendar. |
2 changes: 1 addition & 1 deletion
2
docs/accessibility.mdx → docs/using-daypicker/accessibility.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sort: 10 | ||
sort: 6 | ||
--- | ||
|
||
_Using DayPicker_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sort: 1 | ||
--- | ||
|
||
_Using DayPicker_ | ||
|
||
# DayPicker Anatomy | ||
|
||
DayPicker is a user interface component that allows users to select dates from a calendar. This section provides an overview of the main UI elements that constitute DayPicker. | ||
|
||
## Key Elements | ||
|
||
> TODO: Add a diagram of DayPicker with callouts. |
16 changes: 2 additions & 14 deletions
16
docs/props.mdx → docs/using-daypicker/customization-props.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,15 @@ | ||
--- | ||
sort: 4 | ||
sort: 3 | ||
--- | ||
|
||
_Using DayPicker_ | ||
|
||
# DayPicker Props | ||
# Customization Props | ||
|
||
## Calendar Options | ||
|
||
TODO | ||
|
||
## Months Navigation | ||
|
||
## Selection Modes | ||
|
||
### Single | ||
|
||
### Multiple | ||
|
||
### Range | ||
|
||
### Custom | ||
|
||
## Internationalization | ||
|
||
## Styling |
6 changes: 3 additions & 3 deletions
6
docs/guides/localization.mdx → docs/using-daypicker/localization.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
sort: 4 | ||
--- | ||
|
||
_Using DayPicker_ | ||
|
||
# Selection Modes | ||
|
||
## Single Selections | ||
|
||
## Multiple Selections | ||
|
||
## Range Selections | ||
|
||
## Custom Selections | ||
|
||
Create custom selection rules to allow or disallow specific dates. | ||
|
||
- See [Custom Selections](/advanced-guides/custom-selections) in the Advanced Guides |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.