-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add month and year pickers to DateRangePicker and RangeCalendar (…
…#3302) * feat: add month and year pickers to DateRangePicker and RangeCalendar * chore: update docs * Update .changeset/kind-cobras-travel.md * chore: react package version --------- Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>
- Loading branch information
1 parent
01c1916
commit b312788
Showing
17 changed files
with
117 additions
and
33 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
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,6 @@ | ||
--- | ||
"@nextui-org/calendar": patch | ||
"@nextui-org/date-picker": patch | ||
--- | ||
|
||
Add month and year picker to DateRangePicker and RangeCalendar (#3089, #3090) |
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
21 changes: 21 additions & 0 deletions
21
apps/docs/content/components/date-range-picker/with-month-and-year-pickers.ts
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,21 @@ | ||
const App = `import {DateRangePicker} from "@nextui-org/react"; | ||
export default function App() { | ||
return ( | ||
<div className="w-full max-w-xl flex flex-row gap-4"> | ||
<DateRangePicker | ||
label="Birth Date" | ||
variant="bordered" | ||
showMonthAndYearPickers | ||
/> | ||
</div> | ||
); | ||
}`; | ||
|
||
const react = { | ||
"/App.jsx": App, | ||
}; | ||
|
||
export default { | ||
...react, | ||
}; |
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
18 changes: 18 additions & 0 deletions
18
apps/docs/content/components/range-calendar/with-month-and-year-picker.ts
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,18 @@ | ||
const App = `import {RangeCalendar} from "@nextui-org/react"; | ||
export default function App() { | ||
return ( | ||
<RangeCalendar | ||
aria-label="Date (Show Month and Year Picker)" | ||
showMonthAndYearPickers | ||
/> | ||
); | ||
}`; | ||
|
||
const react = { | ||
"/App.jsx": App, | ||
}; | ||
|
||
export default { | ||
...react, | ||
}; |
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
Oops, something went wrong.