Skip to content

[UI Help] DatePicker resizing #2353

Closed Answered by gpbl
LWJerri asked this question in Support
Discussion options

You must be logged in to vote

@LWJerri there is a discussion about targeting buttons with tailwind, thanks for your feedback!

In your case, you can set the border radius via the CSS variable:

// App.css
.rdp-root.my-calendar {
  --rdp-day_button-border-radius: none;
}
import { DayPicker } from 'react-day-picker';
import 'react-day-picker/style.css';

import './App.css';

export default function App() {
  return <DayPicker className="my-calendar" mode="range" />;
}

https://stackblitz.com/edit/react-day-picker-9-2332-acy6q5?file=src%2FApp.tsx

With Tailwind, you can also update the day_button class name:

<DayPicker classNames={{
    day_button: "... border-radius-none" 
  }}
/>

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by LWJerri
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants