Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue10805.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
namespace Maui.Controls.Sample.Issues;

[Issue(IssueTracker.Github, 10805, "Date Format property in DatePicker not working on Windows with date Format", PlatformAffected.UWP)]
public class Issue10805 : ContentPage
{
public Issue10805()
{
var label = new Label
{
Text = "Verify DatePicker DateFormat",
AutomationId = "Label",
};

var datePicker = new DatePicker
{
Format = "dd.MM.yyyy",
Date = new DateTime(2022, 2, 25),
};

Content = new StackLayout
{
Children =
{
label,
datePicker
},
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#if TEST_FAILS_ON_CATALYST //More Info: https://github.com/dotnet/maui/issues/29099
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues;
public class Issue10805 : _IssuesUITest
{
public Issue10805(TestDevice device) : base(device)
{
}

public override string Issue => "Date Format property in DatePicker not working on Windows with date Format";

[Test]
[Category(UITestCategories.DatePicker)]
public void VerifyDatePickerDotBasedDateFormat()
{
App.WaitForElement("Label");
VerifyScreenshot();
}
}
#endif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/Core/src/Platform/Windows/CalendarDatePickerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ internal static string GetSeparator(string format)
separator = "-";
else if (format.Contains(' ', StringComparison.CurrentCultureIgnoreCase))
separator = " ";
else if (format.Contains('.', StringComparison.CurrentCultureIgnoreCase))
separator = ".";
else
separator = string.Empty;

Expand Down
Loading