-
In v8, Code// these are no longer available in v9
const { classNames, styles, components } = useDayPicker(); Expected BehaviorExpected
ScreenshotHere's basically what I'm trying to move from v8 to v9 and why those props would be useful: |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Hi @staaky thanks for your feedback! I understand from the screen you are trying to do different things, but I'm not sure I get all of them. I see you need:
Am I correct? Roughly it should work like the following. import { DayPicker, getDefaultClassNames } from "react-day-picker";
export function Example() {
const ref = React.useRef<HTMLDivElement>(null);
const classNames = getDefaultClassNames();
return (
<DayPicker
components={{
Months: (props) => <div {...props} ref={ref} />
}}
classNames={{
weekdays: `${classNames} your-sticky-style`
}}
/>
);
}
|
Beta Was this translation helpful? Give feedback.
-
I'm moving this issue to the support forum - so far I don't see any change required to the DayPicker source code. Should we should work providing better docs for migrating from older |
Beta Was this translation helpful? Give feedback.
-
Hi @gpbl, Thanks, I wasn't aware of Instead of making all weekdays sticky, I've hidden them. Then I replaced In my usecase the default components and classnames will probably be good enough. Not being able to access |
Beta Was this translation helpful? Give feedback.
-
I see what you mean @staaky. There's really anything else preventing to add However I'm interested in your use case of vertically stacked calendars, which is interesting... maybe we could support it natively in DayPicker. How does it accommodate on landscape mode, would you mind sharing more screenshots? Thanks. |
Beta Was this translation helpful? Give feedback.
-
@melkras @staaky In v9.0.9 we added back the missing properties to the DayPickerContext returned by Thanks for your feedback so far, let me know if that worked for you! |
Beta Was this translation helpful? Give feedback.
@melkras @staaky In v9.0.9 we added back the missing properties to the DayPickerContext returned by
useDayPicker
.Thanks for your feedback so far, let me know if that worked for you!