We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How do I bind the collection with CalendarInlineEventClass so that I can see multiple events on different dates

I am using sfCalendar .I am facing below issues:-

1.       I have a collection of events/description which needs to be shown on the calendar as events/Appointments.

How do I bind the collection with CalendarInlineEventClass so that I can see multiple events on different dates

2.       How do I show an event description  on the  date cell?

 


I have attach the sample design please help me on the same and if possible provide source code for the same. 


Attachment: SFCal_b99c304c.rar

18 Replies

RG Rajkumar Ganesamoorthy Syncfusion Team November 16, 2016 08:46 AM UTC

Hi Sanket,

Thank you for contacting Syncfusion Support.

We have prepared custom sample to show demo on "How to bind the Calendar event collection and how to customize the calendar cell based on the appointment subject". Please find the sample below

Sample: http://www.syncfusion.com/downloads/support/forum/127420/ze/InlineCustomization594033959 

Regards,
Rajkumar G
 



SJ Sanket joshi November 25, 2016 02:19 PM UTC

Thank you so much Rajkumar. I will implement the same.




RG Rajkumar Ganesamoorthy Syncfusion Team November 28, 2016 10:27 AM UTC

Hi Sanket,

Thanks for your update.

We are happy to hear that you have achieved your requirement based on your provided details.

Please let us know if you need any other assistance on this.

Regards,
Rajkumar G
 



SJ Sanket joshi December 28, 2016 06:32 AM UTC

Hi Rajkumar,

I implemented the code. but since we are setting  args.View=Label on MonthCell_Loaded event .The date on the month cell is not visible and the event is getting added on the next cell.
I need to show the event as well as the date on the month cell similar to the image attached.
Kindly help me with this.


Attachment: SFCal_b99c304c_afd690f.rar


RG Rajkumar Ganesamoorthy Syncfusion Team January 2, 2017 10:01 AM UTC

Hi Sanket,

Thanks for your update.

We have preapred sample based on the your provided snapshot. Please find the sample from below

Sample: http://www.syncfusion.com/downloads/support/forum/127420/ze/InlineCustomization1834125428 

Regards,
Rajkumar G 



SJ Sanket joshi January 6, 2017 01:54 PM UTC

Hi Rajkumar,

Thank you so much for your quick help! I could achieve my requirement.
There is one issue that i am facing. 
I am getting duplication of dates. Kindly refer the attachment .
Below is the code that i have implemented on SfCalendar_OnMonthCellLoaded

  private void SfCalendar_OnMonthCellLoaded(object sender, MonthCell args)
        {
            string Hours = string.Empty;
            for (int i = 0; i < _viewModel.Collection.Count; i++)
            {
                if (args.Date.Date.CompareTo(_viewModel.Collection[i].StartTime.Date) == 0)
                {
                    Hours = String.Format("{0:0.0}", Convert.ToDecimal(_viewModel.Collection[i].Subject));
                }
            }
            Grid customMonthCell = new Grid()
            {
                ClassId = args.Date.ToString(),
                ColumnDefinitions =
                {
                    new ColumnDefinition {Width = new GridLength(.1,GridUnitType.Auto) },
                    new ColumnDefinition {Width = new GridLength(1,GridUnitType.Star) }
                },
                RowDefinitions =
                {
                    new RowDefinition {Height = new GridLength(.1,GridUnitType.Star) }
                },
            };

            Label date = new Label()
            {
                HeightRequest = 20,
                Text = args.Date.Day.ToString(),
                HorizontalTextAlignment = TextAlignment.Center,
                VerticalTextAlignment = TextAlignment.Center,
                TextColor = Color.Gray,
                FontAttributes = FontAttributes.Bold,
                FontSize = FontSizeProvider.Font_Size(IWMSEnums.FontSize.MEDIUM)
            };
            Label workingHours = new Label()
            {
                Text = Hours,
                HeightRequest = 20,
                HorizontalTextAlignment = TextAlignment.End,
                VerticalTextAlignment = TextAlignment.End,
                FontAttributes = FontAttributes.Bold,
                FontSize = FontSizeProvider.Font_Size(IWMSEnums.FontSize.SMALL)
            };
            if (_viewModel.SelectedTeamMember != null)
            {
                if (Convert.ToDecimal(_viewModel.SelectedTeamMember.WorkingHoursPerDay) <= Convert.ToDecimal(Hours))
                {
                    workingHours.TextColor = Color.Green;
                }
                else
                {
                    workingHours.TextColor = Color.Red;
                }
            }
            else
            {
                var WorkingHoursPerDay = Settings.CurrentUser.WorkingHoursPerDay;
                if (Convert.ToDecimal(WorkingHoursPerDay) <= Convert.ToDecimal(Hours))
                {
                    workingHours.TextColor = Color.Green;
                }
                else
                {
                    workingHours.TextColor = Color.Red;
                }
            }
            customMonthCell.Children.Add(date, 0, 0);
            Grid.SetColumnSpan(date, 2);
            customMonthCell.Children.Add(workingHours, 0, 0);
            Grid.SetColumnSpan(workingHours, 2);

            var customMonthCellTapGestureRecognizer = new TapGestureRecognizer();
            customMonthCell.GestureRecognizers.Add(customMonthCellTapGestureRecognizer);
            customMonthCellTapGestureRecognizer.Tapped += customMonthCellTapGestureRecognizer_Tapped;

            args.View = customMonthCell;
        }


Attachment: sfCalendar_8c222a39.zip


RG Rajkumar Ganesamoorthy Syncfusion Team January 9, 2017 04:10 AM UTC

Hi Sanket,

Thanks for your update.

We have checked the reported issue "Duplication dates on OnMonthCellLoadedEvent args" in our side based on your provided code snippet. But we were unable to reproduce the reported issue in our side. So could you please provide more information like your application time zone and also let us know about your Essential Studio version. This will help us to provide appropriate solution on this.

Regards,
Rajkumar G



SJ Sanket joshi January 12, 2017 12:58 PM UTC

Hi,

My Application Time Zone- IST and I am using
Microsoft Visual Studio Community 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01038

Regards,
Sanket


RG Rajkumar Ganesamoorthy Syncfusion Team January 13, 2017 05:34 AM UTC

Hi Sanket,

Thanks for your update.

We have checked the reported issue with our latest version (14.4.0.20). But we were unable to reproduce the reported issue in our side. So could you please upgrade your Essential Studio version to our latest and check the reported issue. please find the download link for the our latest version in below

Link: https://www.syncfusion.com/forums/128025/essential-studio-2016-volume-4-service-pack-release-v14-4-0-20-available-for-download

Regards,
Rajkumar G









VS Vikas Surve January 13, 2017 10:49 AM UTC

Hi Rajkumar,

Thanks for your snippet code.
I am facing same issue.
i am using package Syncfusion.Xamarin.SfCalendar.14.4.0.15 for showing calendar. 
While i am trying to customise months cell. its gets duplicate date in month view.
Currently we are using trial version for implementation.


RG Rajkumar Ganesamoorthy Syncfusion Team January 16, 2017 11:22 AM UTC

Hi Vikas,

Thank you for contacting Syncfusion Support.

We were able to reproduce the reported issue with our Essential Studio version (14.4.0.15) and this issue were fixed with our latest Essential Studio version (14.4.0.20). So could you please download the our latest version from below link and check the reported issue in that version.

Link: https://www.syncfusion.com/forums/128025/essential-studio-2016-volume-4-service-pack-release-v14-4-0-20-available-for-download 
Regards,
Rajkumar G 



VS Vikas Surve January 18, 2017 05:46 AM UTC

Hi RajKumar,
We want to disable the following event from Calendar controls
1) On Click of Month Name : Which shows year view.
2) Swipe Event on Calendar : Which Change Month.
after customise the data on calendar. it will shows the wrong day for all date. like on date 1/1/2017 is Sunday but Its shows Monday.

PFA.


Attachment: Simulator_Screen_Shot_18Jan2017,_11.05.18_AM_7a034010.rar


RG Rajkumar Ganesamoorthy Syncfusion Team January 19, 2017 08:37 AM UTC

Hi Vikas,

Thank you for contacting Syncfusion Support.

Query 1: Disable year view navigation on click of calendar header

We were able to achieve your requirement by custom header instead of using actual header. We have prepared a sample to show demo on "How to implement custom header in SfCalendar". Please find the sample from below

Sample: http://www.syncfusion.com/downloads/support/forum/127420/ze/TestCalendar1247612062

Query 2: Disable swiping behavior in SfCalendar control

In our current implementation we don't have support for disabling swiping behavior in SfCalendar control. We have considered this requirement as a feature request and add this feature on our upcoming volume release 1, SP1 which will be available on March first week.

Query 3: Issue with Calendar customization

We were able to reproduce the reported issue with our Essential Studio version (14.4.0.15) and this issue were fixed with our latest Essential Studio version (14.4.0.20). So could you please download the our latest version from below link and check the reported issue in that version.

Link: https://www.syncfusion.com/forums/128025/essential-studio-2016-volume-4-service-pack-release-v14-4-0-20-available-for-download
 
Regards,
Rajkumar G


VS Vikas Surve replied to Rajkumar Ganesamoorthy January 19, 2017 01:02 PM UTC

Hi Vikas,

Thank you for contacting Syncfusion Support.

Query 1: Disable year view navigation on click of calendar header

We were able to achieve your requirement by custom header instead of using actual header. We have prepared a sample to show demo on "How to implement custom header in SfCalendar". Please find the sample from below

Sample: http://www.syncfusion.com/downloads/support/forum/127420/ze/TestCalendar1247612062

Query 2: Disable swiping behavior in SfCalendar control

In our current implementation we don't have support for disabling swiping behavior in SfCalendar control. We have considered this requirement as a feature request and add this feature on our upcoming volume release 1, SP1 which will be available on March first week.

Query 3: Issue with Calendar customization

We were able to reproduce the reported issue with our Essential Studio version (14.4.0.15) and this issue were fixed with our latest Essential Studio version (14.4.0.20). So could you please download the our latest version from below link and check the reported issue in that version.

Link: https://www.syncfusion.com/forums/128025/essential-studio-2016-volume-4-service-pack-release-v14-4-0-20-available-for-download
 
Regards,
Rajkumar G

HI Rajkumar,


Query 3: Issue with Calendar customization

We were able to reproduce the reported issue with our Essential Studio version (14.4.0.15) and this issue were fixed with our latest Essential Studio version (14.4.0.20). So could you please download the our latest version from below link and check the reported issue in that version.

Link: https://www.syncfusion.com/forums/128025/essential-studio-2016-volume-4-service-pack-release-v14-4-0-20-available-for-download

 

We have use the same version as you mention above. still same issue  get reproduced as mention my previous comment. Could you look and do necessary.




VS Vikas Surve replied to Vikas Surve January 19, 2017 01:05 PM UTC

Hi Vikas,

Thank you for contacting Syncfusion Support.

Query 1: Disable year view navigation on click of calendar header

We were able to achieve your requirement by custom header instead of using actual header. We have prepared a sample to show demo on "How to implement custom header in SfCalendar". Please find the sample from below

Sample: http://www.syncfusion.com/downloads/support/forum/127420/ze/TestCalendar1247612062

Query 2: Disable swiping behavior in SfCalendar control

In our current implementation we don't have support for disabling swiping behavior in SfCalendar control. We have considered this requirement as a feature request and add this feature on our upcoming volume release 1, SP1 which will be available on March first week.

Query 3: Issue with Calendar customization

We were able to reproduce the reported issue with our Essential Studio version (14.4.0.15) and this issue were fixed with our latest Essential Studio version (14.4.0.20). So could you please download the our latest version from below link and check the reported issue in that version.

Link: https://www.syncfusion.com/forums/128025/essential-studio-2016-volume-4-service-pack-release-v14-4-0-20-available-for-download
 
Regards,
Rajkumar G

HI Rajkumar,


Query 3: Issue with Calendar customization

We were able to reproduce the reported issue with our Essential Studio version (14.4.0.15) and this issue were fixed with our latest Essential Studio version (14.4.0.20). So could you please download the our latest version from below link and check the reported issue in that version.

Link: https://www.syncfusion.com/forums/128025/essential-studio-2016-volume-4-service-pack-release-v14-4-0-20-available-for-download

 

We have use the same version as you mention above. still same issue  get reproduced as mention my previous comment. Could you look and do necessary.



PFA...

Attachment: PackageVersion_f9a00d04.rar


HM Hemalatha Marikumar Syncfusion Team January 20, 2017 09:24 AM UTC

Hi Vikas,

Thanks for your update.

Query: Issue with Calendar customization

We have checked the reported issue " returns wrong day for all Date" with our latest 14.4451.0.20 Nuget packages. We were unable to reproduce the reported issue at our end. We have checked the same with the following simulator version

1. iPhone 4s iOS 9.3

2. iPhone 6s iOS 9.3

3. iPad 2 iOS 6.3

and in Device.

Related screenshot is attached in the following link

Link: http://www.syncfusion.com/downloads/support/forum/127420/ze/screenshot6584269

Please update more details like whether you are facing this issue in simulator or device and the version of simulator/device in which you are facing the same, Time zone of your system to analyze more and provide an appropriate solution.

Regards,
Hemalatha M.R.


VS Vikas Surve replied to Hemalatha Marikumar January 20, 2017 09:30 AM UTC

Hi Vikas,

Thanks for your update.

Query: Issue with Calendar customization

We have checked the reported issue " returns wrong day for all Date" with our latest 14.4451.0.20 Nuget packages. We were unable to reproduce the reported issue at our end. We have checked the same with the following simulator version

1. iPhone 4s iOS 9.3

2. iPhone 6s iOS 9.3

3. iPad 2 iOS 6.3

and in Device.

Related screenshot is attached in the following link

Link: http://www.syncfusion.com/downloads/support/forum/127420/ze/screenshot6584269

Please update more details like whether you are facing this issue in simulator or device and the version of simulator/device in which you are facing the same, Time zone of your system to analyze more and provide an appropriate solution.

Regards,
Hemalatha M.R.

We are using Simulator and device with iOS 10.2 version. Same time zone we are used as we mention in previous thread


RG Rajkumar Ganesamoorthy Syncfusion Team January 23, 2017 11:46 AM UTC

Hi Vikas,

We have created a new support incident under your account to track the status of your latest query. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Regards,
Rajkumar G 


Loader.
Live Chat Icon For mobile
Up arrow icon