-
Notifications
You must be signed in to change notification settings - Fork 469
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
[Bug]: Date Picker is cut off when positioned on the right end of a page #823
Comments
@severinlandolt hey, I feel I can fix this. Should I submit a PR? |
That would be great! I just assigned you. I have to go to sleep now🤣 |
Would try to submit the PR by the time you wake up!🤣 |
Hey guys, I was experimenting with the component and sort of found it difficult to fix the alignment automatically. This is so because the Calendar is being rendered in an absolute component, which makes it very tricky to use flex boxes. I however, created a flag that will dock the calendar to left/right, thereby fixing the issue. Can anyone suggest any improvements? @severinlandolt @lucafaggianelli |
I've completed some tests and its basically a feature that our underlying library (headlessui) does not offer natively. Thank you @rajdip-b for your initial effort and suggesting a new prop. We will do some thinking around that an come back later! |
Sure!! |
Yep indeed I reached the same conclusion on headlessui. Though I saw you use the lib floating ui as well in tremor, which seems more suited for this task. About the new property, maybe I would call it "anchor" or something similar to make it more flexible so it could have values like right, left, center for the horizontal alignment and top, bottom, middle for the vertical one, I see many libs using this pattern. |
Yeah even I did notice that. Should I proceed with the implementation, see what all changes I can implement? @lucafaggianelli @severinlandolt |
I guess this issue can be closed then? |
I will keep it open until Headless UI has been updated |
Sure! |
Any update on this? |
Hi @rlancejohnson → still blocked! Waiting for headless ui 4.0. |
Hi @lucafaggianelli @rajdip-b @rlancejohnson! Brief update: The overflow problem still persists and it looks like that this won't be fixable soon. I will update this asap once there is a fixing headless ui release. If you are in desperate need of a date picker with improved positioning, it's worth taking a look here: https://raw.tremor.so/docs/inputs/date-range-picker |
🎉 This issue has been resolved in version 3.18.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 3.18.5-beta-tremor-v4.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Tremor Version
3.11.1
Link to minimal reproduction
none
Steps to reproduce
What is expected?
the floating menu containing the calendar should be automatically moved to fit into the page
I would also accept an
anchor
option to force the menu to be anchored on the right of the input field rather than on the leftWhat is actually happening?
What browsers are you seeing the problem on?
Chrome
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: