Closed veerareddy14 closed 3 years ago
Please follow guidelines for Intl from the readme. You should not use Intl directly where you use it since you don't need it on the web platform.
Also I do not see visible={true} as prop so it won't be visible.
Thank you, I upgraded web to 0.14.0 and it started working as given in docs
import React, { useState } from "react"; import { View } from "react-native"; import { DatePickerModal } from "react-native-paper-dates"; import "intl"; import "intl/locale-data/jsonp/en"; const DateTimePicker = () => { const [date, setDate] = useState(new Date()); const onDismissSingle = () => {}; const onConfirmSingle = (params) => { setDate(params.date); }; return ( <View style={{ width: "50%", height: "50%" }}> <DatePickerModal mode="single" onDismiss={onDismissSingle} dates={date} onConfirm={(params) => onConfirmSingle(params)} locale={"en"} /> ); };
export default DateTimePicker;