Closed muhammadhaseebsohail closed 5 years ago
Do you have a repo you can link to where this error is happening? It’s kind of hard to figure out what’s going on from the text you posted.
this is what i am doing @jasonleibowitz : import { Button, Dropdown, } from "react-native";
import AddToCalendarHOC from 'react-add-to-calendar-hoc'; const AddToCalendarDropdown = AddToCalendarHOC(Button, Dropdown); const startDatetime = moment().utc().add(2, 'days'); const endDatetime = startDatetime.clone().add(2, 'hours'); const duration = endDatetime.diff(startDatetime, 'hours'); const event = { description: 'Description of event. Going to have a lot of fun doing things that we scheduled ahead of time.', duration, endDatetime: endDatetime.format('YYYYMMDDTHHmmssZ'), location: 'NYC', startDatetime: startDatetime.format('YYYYMMDDTHHmmssZ'), title: 'Super Fun Event', }
export default class App extends Component{
render() { return ( <AddToCalendarDropdown className={componentStyles} linkProps={{ className: linkStyles, }} event={event} />
);
} }
Well there’s your issue - this library wasn’t built for React Native. Feel free to fork it, make any changes, and submit a PR if you want to add support for React Native.
P.S. Check out this link on how to enter code blocks in Github markdown. It makes reading your code significantly easier.
can you please recommend me a library for this? i need to copy sessions to gmail/outlook? i will be greatfull to you.
Try googling react native add to calendar?
acknowledge
Bug report
My code is : import AddToCalendarHOC from 'react-add-to-calendar-hoc'; const AddToCalendarDropdown = AddToCalendarHOC(Button, Dropdown); import moment from 'moment/min/moment-with-locales'
const startDatetime = moment().utc().add(2, 'days'); const endDatetime = startDatetime.clone().add(2, 'hours'); const duration = endDatetime.diff(startDatetime, 'hours'); const event = { description: 'Description of event. Going to have a lot of fun doing things that we scheduled ahead of time.', duration, endDatetime: endDatetime.format('YYYYMMDDTHHmmssZ'), location: 'NYC', startDatetime: startDatetime.format('YYYYMMDDTHHmmssZ'), title: 'Super Fun Event', }
render() { return (
}
Can you please help me out , how can i figure out this?