Comments (4)
Did you add
"nativescript-calendar": "1.0.7",
to your package.json and ran npm install?
I'm running
`import {createEvent} from "nativescript-calendar";
import {CreateEventOptions} from "nativescript-calendar";
let options:CreateEventOptions = {
title: "SomeText",
startDate: new Date(1000),
endDate: new Date(1000),
calendar: {name: "ACalendar"}
//uses first calender it finds calendar: {name: undefined}
};
createEvent(options)
`
without problems.
Just updated to 1.1.1 and the imports are those:
import {FindEventsOptions} from "nativescript-calendar";
import {CreateEventOptions} from "nativescript-calendar";
import {findEvents} from "nativescript-calendar";
import {createEvent} from "nativescript-calendar";
import {hasPermission} from "nativescript-calendar";
import {requestPermission} from "nativescript-calendar";
from nativescript-calendar.
I am using
"nativescript-calendar": "^1.1.1",
While discussing on slack. I got the information that Visual studio code has certain issues in module implementation.
Using any import i have same error, even i try like below implementation
import { createEvent } from "nativescript-calendar";
I did the following things to fix the error
- Add typings key in package.json in node_modules/nativescript-calendar.
"typings":"calendar.d.ts",
- Remove
export module
from both calendar-common.d.ts and calendar.d.ts - Copy calendar-common.js code to calendar.ios.js and .android.js
After doing this issue was solved.
from nativescript-calendar.
I'm sorry you had to do that. The latest version has a typings entry in package.json and an example in the readme on how to use it in TS.
from nativescript-calendar.
Sounds good. Thanks
from nativescript-calendar.
Related Issues (20)
- Event/Calendar ID's must be of type 'string'
- Add 'reminders' to 'findEvents'
- 'findEvents' on iOS doesn't return the event URL
- (Events in) custom calendars on Android can't be viewed nor removed
- Deleting events on iOS only works by 'id'
- Feature request - get color of event/calendar
- Getting list of calendars (Android)
- Getting doCreateEvent error: Error: android.database.sqlite.SQLiteException error in android version below 6.
- recurrence property not working HOT 2
- Crashes during require HOT 2
- Permissions issues when using Angular with 4.1.0 HOT 2
- App crashes or does not create events on worker thread HOT 1
- Failing to create event suddenly HOT 7
- Read and Write Permission Error in Android 8 HOT 2
- Returning E-Mail for Attendees HOT 5
- AndroidX compatibility for NativeScript 6
- Cannot get list of calendars awailable. HOT 1
- default calendar id on android
- NS 7 support
- Error when calling findEvent() for events without recurrence rules on iOS 16.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-calendar.