diff --git a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs index 85f035a604f7..d06416df4aed 100644 --- a/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs +++ b/src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs @@ -901,6 +901,11 @@ private void SetWaterMarkText() switch (SelectedDateFormat) { + case CalendarDatePickerFormat.Custom: + { + watermarkText = string.Format(CultureInfo.CurrentCulture, watermarkFormat, CustomDateFormatString); + break; + } case CalendarDatePickerFormat.Long: { watermarkText = string.Format(CultureInfo.CurrentCulture, watermarkFormat, dtfi.LongDatePattern.ToString()); @@ -913,6 +918,7 @@ private void SetWaterMarkText() break; } } + _textBox.Watermark = watermarkText; } else