首页 > 解决方案 > airbnb/react-dates 中未显示箭头(在移动屏幕中是,不在桌面中)

问题描述

我正在使用库 airbnb/react-dates 作为日期选择器。我正在使用标准代码:

<SingleDatePicker
  orientation={datePickerOrientation}
  date={newEndsOn}
  onDateChange={(date) => setNewEndsOn(date)}
  focused={datePickerFocused}
  onFocusChange={({ focused }) => setDatePickerFocused(focused)}
/>

根据移动设备或台式机,哪里datePickerOrientation可以获得“垂直”或“水平”的值。

在移动设备中,我可以看到导航箭头移动数月。不幸的是,我在桌面版上看不到箭头。

有人知道为什么吗?这是预期的行为吗?

我在这个问题中发现您可以覆盖箭头,但不幸的是它只适用于移动设备:

https://github.com/airbnb/react-dates/issues/692

不知何故,桌面的箭头不在 dom 中。

标签: react-dates

解决方案


推荐阅读