Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add selectorButtonPlacement prop to DatePicker component #3015

Open
maxsynnott opened this issue May 17, 2024 · 1 comment

Comments

@maxsynnott
Copy link

maxsynnott commented May 17, 2024

Is your feature request related to a problem? Please describe.

Currently the DatePicker component always renders the selectorButton on the right side of the input and there is no way of changing this placement.

I suggest adding a prop to allow the placement to be modified

I think this feature is pretty necessary to align with other inputs that are using icons in their startContent prop.

Describe the solution you'd like

I think there should be a new prop on the DatePicker component like so:

selectorButtonPlacement?: "left" | "right" // default "right"

Describe alternatives you've considered

I've currently hacked around it using css but it's not pretty

<DatePicker
	...
	className="date-picker-left-selector-button"
	...
/>
.date-picker-left-selector-button [data-slot="inner-wrapper"] {
	flex-direction: row-reverse;
	column-gap: 0;
}

.date-picker-left-selector-button [data-slot="selector-button"] {
	justify-content: start;
}
Screenshot 2024-05-17 at 4 29 17 PM

Screenshots or Videos

No response

Copy link

linear bot commented May 17, 2024

@maxsynnott maxsynnott changed the title [Feature Request] Change placement of selectorButton on DatePicker component [Feature Request] Add selectorButtonPlacement prop to DatePicker component May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant