This is a migrated thread and some comments may be shown as answers.

Does inlineEventSelected work?

3 Answers 81 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matt
Top achievements
Rank 1
Matt asked on 26 Aug 2016, 07:52 PM

The Calendar documentation lists inlineEventSelected as an available event and the API documentation also includes it (though it does say only available in iOS), but it doesn't seem to work for me. My application is an AngularJS app. The HTML template looks like this:

<RadCalendar [eventSource]="eventSource" eventsViewMode="inline" (inlineEventSelected)="openEvent($event)" viewMode="month"></RadCalendar>

and the method in my component.ts looks like this:

openEvent(evt: CalendarInlineEventSelectedData) {
  console.log(JSON.stringify(evt.eventData));
}

When I run the application in the iOS emulator, the calendar displays, selecting the date opens my events inline, but the inline selection does not seem to fire.

How can I handle the user selecting an event from the inline list?

3 Answers, 1 is accepted

Sort by
0
Nikolay Tsonev
Telerik team
answered on 29 Aug 2016, 11:54 AM
Hello,

Thank you for contacting us.

I reviewed your code and found that you could use dateSelectedEvent instead of  inlineEventSelected in case you want to handle the event when some of the dates been taped. inlineEventSelected will be fired when an event, part the list of inline events for a given cell, has been selected as it is described in the documentation here. I am attaching sample code where has been how to use dateSelectedEvent

 
app.component.html

<RadCalendar eventSource="Inline"  selectionMode="Single" (dateSelected)="openEvent($event)" viewMode="month"></RadCalendar>


app.component.ts

import {Component} from "@angular/core";
import {CalendarSelectionEventData} from "nativescript-telerik-ui-pro/calendar"
 
@Component({
    selector: "my-app",
    templateUrl: "app.component.html",
})
export class AppComponent {
     public openEvent(args:CalendarSelectionEventData) {
         console.log("event")
         console.dump(args.date);
     }
}


Let me know whether this help or if I could help you further.

Regards,
nikolay.tsonev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Matt
Top achievements
Rank 1
answered on 29 Aug 2016, 02:11 PM

The problem with the date selected event is that I have multiple events per day. While I was evaluating prior to purchasing I implemented my app with date selected and then opened a custom component in a dialog that the user could select the individual event from. Now that I've committed to the tool I started testing on iOS also and the dialog option is a very poor user experience. The inline event display is much cleaner. But using the inline event display, I can't react to the user selecting an indvidual event.

The problem is that no event seems to be triggered when the user taps an event from the list.

0
Nikolay Tsonev
Telerik team
answered on 31 Aug 2016, 02:36 PM
Hello,

Thank you for reporting this problem.

I reviewed your issue and confirmed that this is an real problem while using inlineEventSelectedEvent and RadCalendar in NativeScript Angular2 project. I logged new issue in GitHub, where our developer will review the problem and will provide possible solution for it. 

I hope this is applicable for you

Best Regards,
nikolay.tsonev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Calendar
Asked by
Matt
Top achievements
Rank 1
Answers by
Nikolay Tsonev
Telerik team
Matt
Top achievements
Rank 1
Share this question
or