-
-
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.
fix(date-picker): update calendar classNames in useDateRangePicker (#…
…3258) * fix(date-picker): update calendar classNames in useDateRangePicker * feat(docs): include custom styles in date-range-picker docs --------- Co-authored-by: WK Wong <[email protected]>
- Loading branch information
1 parent
f785d1f
commit 773f300
Showing
6 changed files
with
95 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@nextui-org/date-picker": patch | ||
--- | ||
|
||
Fix calendar props on date-range-picker |
41 changes: 41 additions & 0 deletions
41
apps/docs/content/components/date-range-picker/custom-styles.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,41 @@ | ||
const App = `import {DateRangePicker} from "@nextui-org/react"; | ||
export default function App() { | ||
return ( | ||
<DateRangePicker | ||
calendarProps={{ | ||
classNames: { | ||
base: "bg-background", | ||
headerWrapper: "pt-4 bg-background", | ||
prevButton: "border-1 border-default-200 rounded-small", | ||
nextButton: "border-1 border-default-200 rounded-small", | ||
gridHeader: "bg-background shadow-none border-b-1 border-default-100", | ||
cellButton: [ | ||
"data-[today=true]:bg-default-100 data-[selected=true]:bg-transparent rounded-small", | ||
// start (pseudo) | ||
"data-[range-start=true]:before:rounded-l-small", | ||
"data-[selection-start=true]:before:rounded-l-small", | ||
// end (pseudo) | ||
"data-[range-end=true]:before:rounded-r-small", | ||
"data-[selection-end=true]:before:rounded-r-small", | ||
// start (selected) | ||
"data-[selected=true]:data-[selection-start=true]:data-[range-selection=true]:rounded-small", | ||
// end (selected) | ||
"data-[selected=true]:data-[selection-end=true]:data-[range-selection=true]:rounded-small", | ||
], | ||
}, | ||
}} | ||
className="max-w-xs" | ||
label="Stay duration" | ||
variant="bordered" | ||
/> | ||
); | ||
}`; | ||
|
||
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
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