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?