React-Day-Picker弹出位置

时间:2018-10-11 20:30:27

标签: reactjs react-day-picker

React-Day-Picker project中,是否可以更改DayPicker弹出窗口的位置?我在视图的最右边有一个DayPickerInput,然后DayPicker与Input对齐向左打开,但这会使DayPicker被窗口边缘裁剪。

是否有一种方法可以使DayPicker与Input对齐,并使其向左溢出,以免被窗口的边缘截断?

Right now it looks like this
(the dots are the input)
     ....._____
     |         |
     |         |
     |         |
     |_________|
and I want it to look like this
 _____.....
|         |
|         |
|         |
|_________|

1 个答案:

答案 0 :(得分:0)

经过一番努力,我设法部分复制了日期选择器的标记,并在其中添加了一些虚拟内容:

enter image description here

这样,我们可以看到应用于日期选择器的样式。因此,通过CSS中的一些替代,我们可以实现所需的结果:

enter image description here

希望这会有所帮助:)