day8 / re-com

A ClojureScript library of reusable components for Reagent
https://re-com.day8.com.au
MIT License
797 stars 146 forks source link

Allow user to select the datepicker dropdown position #87

Closed Frozenlock closed 2 years ago

Frozenlock commented 8 years ago

It seems the dropdown position is hardcoded to :below-left. (See https://github.com/Day8/re-com/blob/master/src/re_com/datepicker.cljs#L252)

The problem I have with this is that if I want this datepicker to be on the left of the screen, the dropdown overflows outside the window.

Would it be possible to let the user select the position?

Gregg8 commented 8 years ago

We would be happy to take a PR on this one.

MawiraIke commented 2 years ago

I have made a fix for this that adds the keyword argument position to the datepicker-dropdown component. The position keyword can be any position supported in the popover component. Attaching it below.