Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added example

  • Loading branch information...
commit d94411ec301061a3e1c958671b2c81e85fa3811c 1 parent 1c461f3
@joneslee85 authored
Showing with 31 additions and 0 deletions.
  1. +31 −0 example/app.js
View
31 example/app.js
@@ -0,0 +1,31 @@
+// open a single window
+var win = Ti.UI.createWindow({
+ backgroundColor:'white'
+});
+
+var calendarView = Ti.Calendar.createView({
+ top:0
+ //headerColor: "red",
+ //calendarColor: "#aaa8a8"
+});
+
+
+win.add(calendarView);
+
+var today = new Date();
+var nextFiveDay = new Date();
+nextFiveDay.setDate(today.getDate()+5);
+
+var datesArray = [today, nextFiveDay];
+calendarView.setDates(datesArray);
+
+
+calendarView.addEventListener('dateSelected', function(e) {
+ try {
+ alert(e.date);
+ } catch(e) {
+ Ti.API.info(e);
+ }
+});
+
+win.open();
Please sign in to comment.
Something went wrong with that request. Please try again.