From 40fbad3ec632e4ee6ac3c2eed8c0a72c74b045d5 Mon Sep 17 00:00:00 2001 From: dif-sam <41672086+dif-sam@users.noreply.github.com> Date: Mon, 29 May 2023 22:09:13 +0400 Subject: [PATCH] Changing the order during initialization the _daySelector Can fix the issue #11558 --- src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs b/src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs index fb61ea679c..8ff8088a34 100644 --- a/src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs +++ b/src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs @@ -367,11 +367,11 @@ namespace Avalonia.Controls var dt = Date; if (DayVisible) { + _daySelector.FormatDate = dt.Date; var maxDays = _calendar.GetDaysInMonth(dt.Year, dt.Month); _daySelector.MaximumValue = maxDays; _daySelector.MinimumValue = 1; _daySelector.SelectedValue = dt.Day; - _daySelector.FormatDate = dt.Date; } if (MonthVisible)