web-ridge / react-native-paper-dates

Smooth and fast cross platform Material Design date and time picker for React Native Paper
https://www.reactnativepaperdates.com
MIT License
667 stars 173 forks source link

DatePicker modal is working on mobile but not visible web #79

Closed veerareddy14 closed 3 years ago

veerareddy14 commented 3 years ago

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;

RichardLindhout commented 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.

veerareddy14 commented 3 years ago

Thank you, I upgraded web to 0.14.0 and it started working as given in docs