Does inlineEventSelected work?

4 posts, 0 answers
  1. Matt
    Matt avatar
    5 posts
    Member since:
    Jul 2016

    Posted 26 Aug Link to this post

    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?

  2. nikolay.tsonev
    Admin
    nikolay.tsonev avatar
    67 posts

    Posted 29 Aug Link to this post

    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 has 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 show 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
  3. Matt
    Matt avatar
    5 posts
    Member since:
    Jul 2016

    Posted 29 Aug in reply to nikolay.tsonev Link to this post

    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.

  4. nikolay.tsonev
    Admin
    nikolay.tsonev avatar
    67 posts

    Posted 31 Aug Link to this post

    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
Back to Top