Giter Club home page Giter Club logo

Comments (4)

SjurWarEagle avatar SjurWarEagle commented on July 3, 2024

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.

Habeeb-mohamed avatar Habeeb-mohamed commented on July 3, 2024

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

  1. Add typings key in package.json in node_modules/nativescript-calendar. "typings":"calendar.d.ts",
  2. Remove export module from both calendar-common.d.ts and calendar.d.ts
  3. Copy calendar-common.js code to calendar.ios.js and .android.js

After doing this issue was solved.

from nativescript-calendar.

EddyVerbruggen avatar EddyVerbruggen commented on July 3, 2024

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.

Habeeb-mohamed avatar Habeeb-mohamed commented on July 3, 2024

Sounds good. Thanks

from nativescript-calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.