Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

README

latest commit 1473cb7da7
Scott Montgomerie authored October 06, 2010
Octocat-spinner-32 ArrayExtensions Initial Commit October 05, 2010
Octocat-spinner-32 Calendar Initial Commit October 05, 2010
Octocat-spinner-32 CalendarModule.xcodeproj Initial Commit October 05, 2010
Octocat-spinner-32 Classes Initial Commit October 05, 2010
Octocat-spinner-32 Calendar.h Initial Commit October 05, 2010
Octocat-spinner-32 Calendar.m Initial Commit October 05, 2010
Octocat-spinner-32 CalendarModule_Prefix.pch Initial Commit October 05, 2010
Octocat-spinner-32 CalendarProxy.h Initial Commit October 05, 2010
Octocat-spinner-32 CalendarProxy.m Initial Commit October 05, 2010
Octocat-spinner-32 CalendarViewController.h Initial Commit October 05, 2010
Octocat-spinner-32 CalendarViewController.m Initial Commit October 05, 2010
Octocat-spinner-32 CalendarViewController.xib Initial Commit October 05, 2010
Octocat-spinner-32 KLDateSort.h Initial Commit October 05, 2010
Octocat-spinner-32 KLDateSort.m Initial Commit October 05, 2010
Octocat-spinner-32 LICENSE Initial Commit October 05, 2010
Octocat-spinner-32 README README October 06, 2010
Octocat-spinner-32 README.rdoc README October 06, 2010
Octocat-spinner-32 TiCalendarView.h Initial Commit October 05, 2010
Octocat-spinner-32 TiCalendarView.m Initial Commit October 05, 2010
Octocat-spinner-32 TiCalendarViewProxy.h Initial Commit October 05, 2010
Octocat-spinner-32 TiCalendarViewProxy.m Initial Commit October 05, 2010
Octocat-spinner-32 build.py Initial Commit October 05, 2010
Octocat-spinner-32 manifest Initial Commit October 05, 2010
Octocat-spinner-32 titanium.xcconfig Initial Commit October 05, 2010
README.rdoc

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 git@github.com: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.

Something went wrong with that request. Please try again.