Appgutta / AGCalendar

Calendar module for Titanium
Other
80 stars 25 forks source link

How to move Event detail page after user select particular event? #28

Closed jpsubbarayalu closed 11 years ago

jpsubbarayalu commented 11 years ago

Hi Chris,

Thanks for your excellent module.Here can able to add the event.So event displaying in the Table.So if user Tap any event how to move event detail page? Please let me know how to resolve this issue?

With respective native code i can do the following stuff from DidSelectRowIndexPath tableview delegate method.

// Upon selecting an event, create an EKEventViewController to display the event.
self.detailViewController = [[EKEventViewController alloc] initWithNibName:nil bundle:nil];         
detailViewController.event = [self.eventsList objectAtIndex:indexPath.row];
// Allow event editing.
detailViewController.allowsEditing = YES;
//  Push detailViewController onto the navigation controller stack
//  If the underlying event gets deleted, detailViewController will remove itself from
//  the stack and clear its event property.
[self.navigationController pushViewController:detailViewController animated:YES];

Thanks,

ChrisRM commented 11 years ago

Use the event:clicked listener. The README has some example code to illustrate the usage.

jpsubbarayalu commented 11 years ago

Hi Chris,

Thanks for your answer.i am using the following example code.

calendarView.addEventListener("event:clicked", function(e) { var event = e.event; var start_date = new Date(event.startDate); alert(event.title+" will start "+start_date); });

So after selecting any event i can able to see the Alert.But how to Navigate in to Event detail page.Actually in iOS native part it will automatically take care EKEventViewController (EventKitUI).

Please let me know how to navigate event to event detail page.

aaronce commented 11 years ago

You have to create the Event view and pass the event data manually, this module handles the calendar UI and data storage.

an example of doing that would be to create a new Ti.UI.Window when an event:clicked is fired and pass the target event information to it.

ChrisRM commented 11 years ago

Hmm, I just realized there is no editEvent method in the module. I'll add it to the roadmap for v1.3.