android+ios+日期选择器,React Native日期时间选择器,适用Android和iOS

本文介绍了一个适用于Android和iOS的跨平台日期时间选择器组件——react-native-modal-datetime-picker。它通过统一的用户界面,简化了在不同平台上处理日期和时间选择的复杂性。组件可通过npm安装,并提供了丰富的自定义选项,如确认和取消按钮的文本样式,以及各种事件回调等。
摘要由CSDN通过智能技术生成

react-native-modal-datetime-picker

625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png

A declarative cross-platform react-native datetime-picker.

Description

This library exposes a cross-platform interface for showing the native date-picker and time-picker inside a modal. You will have an unified user experience, you won't have to worry anymore about testing the device platform and you won't have to programmatically call the Android TimePicker/DatePicker APIs.

Demo

625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png

Setup

This library is available on npm, install it with npm install --save react-native-modal-datetime-picker or yarn add react-native-modal-datetime-picker.

Usage

import React, { Component } from 'react';

import { Text, TouchableOpacity, View } from 'react-native';

import DateTimePicker from 'react-native-modal-datetime-picker';

export default class DateTimePickerTester extends Component {

state = {

isDateTimePickerVisible: false,

};

_showD

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值