Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我曾在本机反应中使用日期时间选择器,但我想在我的自定义 UI 中为日期选择器做。我该怎么做?
我想在android和IOS中都如下图所示
请按照以下步骤操作。
那就是你可以像你身边一样生成一个日期选择器。
您可以通过使用react-native-date-picker库和以下代码来获得该外观:
<DatePicker date={date} onDateChange={setDate} mode="date" />