SfDatePicker not updating the binding value if value is set in page OnNavigatedTo.

Hi,

I have a problem with setting the binding on the SelectedDate property of the SfDatePicker component if the value is set in the OnNavigatedTo method of the page. 

I have attached a sample application demonstrating the issue.

The screen has 3 preset radio buttons and a custom radio button. If the ViewModel has been set with a LastReadDate, I need the custom radio button to be enabled and the date picker to default to the LastReadDate. If the ViewModel has be set with a min date for LastReadDate, the default screen should be default to 2 Mnths.


The correct thing happens if LastReadDate is set to MinDate. Specifying a LastRead date doesn't force the DatePicker to update correctly.


Kind Regards,

Andrew


Attachment: SfDatePicker_a6cd9d1c.zip

1 Reply

VM Vidyalakshmi Mani Syncfusion Team April 24, 2026 02:44 PM UTC

Hi Andrew,


Thank you for reaching out to us.


We have reviewed the sample application you shared, and based on the code provided, the behavior is working as expected on our end. For your reference, we have attached a video demonstrating this.


If you are still experiencing the issue, we recommend updating the date value within the OnNavigatedTo method using `MainThread.BeginInvokeOnMainThread`. This ensures that the binding is applied after the view has been fully rendered.


Example code:


 

protected override void OnNavigatedTo(NavigatedToEventArgs args)

{

    base.OnNavigatedTo(args);

 

    // Defer the binding updates to ensure the view is fully rendered

    MainThread.BeginInvokeOnMainThread(() =>

    {

        if (vm.LastReadDate != DateTime.MinValue)

        {

            vm.ReadingQuickLinks.Execute("3");

            rbCustom.IsChecked = true;

        }

        else

        {

            vm.IntervalStartDate = DateTime.Today.AddMonths(-2);

            rb2Months.IsChecked = true;

            vm.ReadingQuickLinks.Execute("0");

        }

    });

}

 


Please try this approach and let us know if it resolves the issue on your side.


Regards,

Vidyalakshmi M.



Attachment: Video_643dfdce.zip

Loader.
Up arrow icon