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.
Unfortunately, activation email could not send to your email. Please try again.

Bindable property SelectedDate not highlighting date on load

Thread ID:

Created:

Updated:

Platform:

Replies:

127597 Nov 26,2016 01:48 PM Nov 29,2016 05:55 AM Xamarin.Forms 4
loading
Tags: SfCalendar
Piotr
Asked On November 26, 2016 01:48 PM

There is a problem with SfCalendar control. It successfully binds to Calendar item collection but until we do not highlight specific date there's not highlight even though month in header is perfectly correct.

Here's the code

<Syncfusion:SfCalendar x:Name="sfCalendar" HeaderHeight="60" DataSource="{Binding calendarItems, Mode=OneWay}" TransitionMode="Float" ShowHeader="True" SelectedDate="{Binding selectedDate, Mode=TwoWay}" ShowNavigationButtons="True" ViewMode="MonthView" ShowInlineEvents="False" HeightRequest="400" FirstDayofWeek="1">

private DateTime _selectedDate { get; set; }
        public DateTime selectedDate
        {
            get
            {
                return _selectedDate;
            }
            set
            {
                _selectedDate = value;
                RaisePropertyChanged("selectedDate");
            }
        }

public CalendarViewModel()
        {
            LoadCommand();
            selectedDate = DateTime.Now;
            //new Syncfusion.SfCalendar.XForms.CalendarInlineEvent {  }
        }

It works good when user manually clicks today's date on the calendar.



Attachment: sfCalendar_c483cc08.rar

Rajkumar Ganesamoorthy [Syncfusion]
Replied On November 28, 2016 04:45 AM

Hi Piotr, 
Thank you for contacting Syncfusion Support. 
We have checked the reported issue "SelectedDate not highlighting date on load". But we were unable to reproduce the reported issue . We have attached a sample in which we have checked the reported issue below 
So could you please more information like issue reproducing sample, your application time zone details etc. That will help us to provide appropriate solution on this. 
Regards,
Rajkumar G 


Piotr
Replied On November 28, 2016 11:21 AM

Hi Rajkumar,
Thank you for you kind reply.

The problem occurs when you add this exact code:
HeaderHeight="60" TransitionMode="Float" ShowHeader="True" ShowNavigationButtons="True" ViewMode="MonthView" ShowInlineEvents="False" HeightRequest="400" FirstDayofWeek="1"    to SfCalendar.  

We have no idea which property causes the problem. You can find your project attached with proper modifcation which causes the exact problem. 
Thank you in advance for your kind help.

Attachment: issueTesting_846405c6.rar

Piotr
Replied On November 28, 2016 12:11 PM

Hi 

We found the cause fo the issue. We use the European firstDayOfWeek set to "1" so the week starts from Monday. When the property is set as we mentioned, Today's is not beeing highlighted. Could you please include this test in further investigation. 

Rajkumar Ganesamoorthy [Syncfusion]
Replied On November 29, 2016 05:55 AM

Hi Piotr,

Thanks for your update.

A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

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

Please let me know if you have any questions.

Regards,
Rajkumar G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;