Giter Site home page Giter Site logo

appcelerator-calendar-module's Introduction

Appcelerator Calendar Module

This is a module that displays an iPhone-like calendar widget, based on the work of Keith Lazuka, dba The Polypeptides .

Building


First download the code: git clone [email protected]:smontgomerie/Appcelerator-Calendar-Module.git

cd Appcelerator-Calendar-Module

Then build the code. ./build.py

Install the calendar into your app. cp calendarmodule-iphone-xxx.zip ~/Library/Application\ Support/Titanium/

Finally, in your app’s tiapp.xml file: <modules>

	  <module version="xxx">calendarmodule</module>
	</modules>

You’ll need to at least touch your iPhone app before including it (assuming you’re building with Xcode, not Titanium).

Basic Usage


To add a view:

var calendarView = Ti.Calendar.createView({
    top:0
    /*headerColor: "red",
     calendarColor: "#aaa8a8"*/
});
calendarView.show();
win.add(calendarView);

When a date is selected, a ‘dateSelected’ event is thrown:

calendarView.addEventListener(‘dateSelected’, function(e) {

try {

// Do something with the date

   	} catch(e) {
        Ti.API.info(e);
    }
});

The component is able to show that there is an event on a certain date with a dot icon. To set which dates are set: var datesArray = [new Date()]; calendarView.setDates(datesArray); You can also use the calendar to save a date (and this needs to be refactored):

calendarView.saveEvent(start, end, event.summary, event.location, event.description);

Note: this requires the EventKit Framework to be included for this to work.

That’s pretty much it! Any edits/improvements are appreciated.

appcelerator-calendar-module's People

Watchers

Jan avatar

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.