Question is : how to add any event in calender?
i want to make a application, in which we can store any event in Calendar. with date and time
and it have 3 option Daily, Weekly, and MOnthly, it remembered me whose option is selected.
NOte : (iphone or android both) (Titanium).
this
This is for Android and for iphone we can use ti.Com.calendar module this is provide by third party. GitHub this
Basically this can be done in android using intents, please find the full documentation
here
ok let's put an example :
var cal = Ti.Calendar.defaultCalendar;
var start_date = new Date(year,month,day,hour,minute,second,millisecond);
var end_date = new Date(year,month,day,hour,minute,second,millisecond);
var event = cal.createEvent({
title: 'Your Title',
begin: start_date,
end: end_date,
availability: Ti.Calendar.AVAILABILITY_FREE,
allDay: true
});
var mil = 60*1000;
//adding alert to your event , this alert will be before the start _date with 1 minutes
var alert1 = event.createAlert({
relativeOffset: mil
});
event.alerts = [alert1];
event.save(Ti.Calendar.SPAN_FUTUREEVENTS);
hope this will help you
here is the documentation link : http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Calendar.Event