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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SelectedDate does not change in ViewModel

Thread ID:

Created:

Updated:

Platform:

Replies:

140675 Oct 31,2018 10:20 PM UTC Nov 1,2018 06:41 AM UTC Xamarin.Forms 1
loading
Tags: SfSchedule
George
Asked On October 31, 2018 10:20 PM UTC

Hello, I have a SfSchedule control defined liket his in XAML:

<syncfusion:SfSchedule ScheduleView="MonthView" SelectedDate="{Binding SelectedDate, Mode = TwoWay}"/>

And the following ViewModel:

public class CalendarViewModel : ViewModelBase
    {
        private DateTime selectedDate;
        public DateTime SelectedDate
        {
            get
            {
                return selectedDate;
            }
            set
            {
                if (selectedDate == value)
                    return;
                selectedDate = value;
                OnPropertyChanged();
            }
        }
        public ICommand ViewCommand { get; private set; }
        public CalendarViewModel()
        {
            SelectedDate = DateTime.Today;
            ViewCommand = new Command(OpenDailyFoodListPage);
        }

        private async void OpenDailyFoodListPage()
        {
            var page = new DailyFoodListPage(SelectedDate);
            await navigationService.NavigateToAsync(page);
        }
    }

     When my page is opened the SfSchedule has the current date selected, which is correct, but upon selecting a different date the SelectedDate property in the ViewModel does not change at all. The setter never seems to get called at all upon selecting a different date in the SfSchedule. Am I doing something wrong or is it an underlying problem with the Binding?

Vigneshkumar Ramasamy [Syncfusion]
Replied On November 1, 2018 06:41 AM UTC

Hi George,

Thanks for contacting Syncfusion support. 

We have checked the query with “ SelectedDate property in the ViewModel does not change at all” and working fine in Android and iOS platform and we are able to relproduce the issue in UWP alone. We have logged bug report for the same. 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.


http://www.syncfusion.com/Account/Logon?ReturnUrl=%2fsupport%2fdirecttrac/  

Regards, 
Vigneshkumar R 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;