Hi there,
I'm trying to get the calendar control working, but without success :( so it's possible to have an example?
I just need to have a calendar control with:
- Week View
- The week view is populate with de items/events that exists in the calendar of the IOS device
- In the week view, when the user tap the event it show the event with: Title, Localisation, Date Begin, Date end, alarm, notes, etc..
- Finaly need to add more events to the calendar
It's importante to have exemples, because this is a new control...
thanks
I think in .NET the correct string of DateTime object has to do with region settings.
In my country this works
String dateString = String.Format("{0}/{1}/{2} {3}", day, month, year, String.Format("{0}:{1}", randomHourSelected, "00"));
DateTime dt = DateTime.Parse (dateString);
Hello,
I am just checking about the progress of this issue. Let me know If you need any further assistance on this issue?
Thank you for using Infragistics Components.
I have a few questions regarding your running of the data source helper example.
For the asynchronous appointments example, you maybe getting an exception because your device may be using another locale. The following line may need rearranged to your locale's format.
dateString = string.Format("{0}-{1}-{2} {3}", month, day, year, time);
The asynchronous appointments example serves as a good example of how to add appointments to an array (GenerateAppointments method) and displaying those appointments on the IGCalendarView through the creation of a new class that adopts the IGCalendarAppointmentDataSource and overriding the GetAppointmentsAsync method.
H therei,
I've run in the device the calendar data source helper example and don't show nothing in the calendar views (year, month or day). and i have calendar events for all days
the othe example crashes in this line (it says:"String was not recognized as a valid DateTime"):
DateTime parsedDate = DateTime.Parse (dateString);
can you help me? thanks
Hi Rui,
The calendar views we support are year, month and day (documentation). For what you're trying to do the day view is the best option. You can set the calendar to this view by using the following code. If you want to disable users from going back to month or year view, then use the disableBackButton property found on the IGCalendarView instance.
calendar.Navigate (NSDate.Now, IGCalendarViewDisplayType.IGCalendarViewDisplayTypeDay);
To get information about the appointment tapped create a class that adopts the IGCalendarViewDelegate and override the AppointmentTapped event. You can use this event to get and display information to the user about the appointment tapped. One of the parameters passed to this event is the IGCalendarAppointment, this contains all the information you need. Finally, don't forget to set the Delegate property on the IGCalendarView to the new class instance adopting IGCalendarViewDelegate you created.
Attached are two different examples written in Xamarin.iOS that use the IGCalendarView. The calendar data source helper example loads appointments from the current device and the calendar async appointment example demonstrates the creation and loading of appointments. Please remember to remove and re-add the IG assembly reference.
Developer's guide documentation for the IGCalendarView can be found at this URL: http://help.infragistics.com/iOS/2013.2/?page=IGCalendarView.html