Custom data in CalendarEvent

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

    Posted 13 Sep Link to this post

    Is it possible to associate custom application data to a CalendarEvent object? I'm writing a Calendar based application where each entry has additional application data associated with it. Currently, I created a class ApplicationEvent that extends CalendarEvent. I'm creating an array of ApplicationEvent objects and setting that to the RadCalendar eventSource. Whenever any events are triggered from the RadCalendar, I get the CalendarEvent but don't have access to any of the custom properties of the ApplicationEvent class.

    The only workaround I can find is that when I handle an event, I search the source array for an element with the same title and date but it seems like a silly way to do it. Also, I do not have a guarantee that the date/title combination in my application is unique so it's not a failsafe method.

  2. nikolay.tsonev
    Admin
    nikolay.tsonev avatar
    66 posts

    Posted 14 Sep Link to this post

    Hi,

    Thank you for your question and for your interest in NativeScript.

    I reviewed your problem end tested the given scenario while using RadCalendar from nativescript-telerik-ui-pro plugin. Regarding to that when the RadCalendar event has been triggered the return object is from type CalendarSelectionEventData and perhaps the objects from the your class extension have been ignored.

    It would help if you could give us some more info about your scenario or to send us sample project where your case could be debugged locally. This will help us to give you better solution.

    You could also review the sample app in here.

    I hope this helps.

    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. nikolay.tsonev
    Admin
    nikolay.tsonev avatar
    66 posts

    Posted 14 Sep Link to this post

    Hi Matt,

    In my further research I found that such implementation to extend CalendarEvent is missing in the plugin. eventSource property is from type ObservableArray<CalendarEvent> and in case you would like to use CustomCalendarEvent the object will not be add in the array properly.

    At the moment the workaround is to search the source array for an element as you mention in your question.  You could log new feature request in this GitHub repo, where you could describe your problem and the feature that you would like to be add in `nativescript-telerik-ui`


    I will be happy to assist you if you have further questions.


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

    Posted 14 Sep Link to this post

    Thanks Nikolay. That was my conclusion as well I just wanted to make sure I wasn't missing something.
  5. nikolay.tsonev
    Admin
    nikolay.tsonev avatar
    66 posts

    Posted 14 Sep Link to this post

    Hi,

    Thank you for your reply,

    You could open new feature request in GitHub, where you could find up to date information about this feature and when will be available.

    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