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

Custom data in CalendarEvent

4 Answers 79 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 14 Sep 2016, 01:02 AM

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.

4 Answers, 1 is accepted

Sort by
0
Nikolay Tsonev
Telerik team
answered on 14 Sep 2016, 06:23 AM
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 plugin. that when the RadCalendar event has been triggered the return object is from type CalendarSelectionEventData and perhaps the objects from 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 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
0
Nikolay Tsonev
Telerik team
answered on 14 Sep 2016, 08:31 AM
Hi Matt,

In my further 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 `--`


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
0
Matt
Top achievements
Rank 1
answered on 14 Sep 2016, 11:09 AM
Thanks Nikolay. That was my conclusion as well I just wanted to make sure I wasn't missing something.
0
Nikolay Tsonev
Telerik team
answered on 14 Sep 2016, 11:21 AM
Hi,

Thank you for your reply,

You could open 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
Tags
Calendar
Asked by
Matt
Top achievements
Rank 1
Answers by
Nikolay Tsonev
Telerik team
Matt
Top achievements
Rank 1
Share this question
or