-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix for DatePicker doesnot updates the Format on Windows #30204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
cce25ee
636d949
210f7af
2a9c5fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,46 @@ public async Task FormatInitializesCorrectly(string format, string nativeFormat) | |
|
||
await ValidatePropertyInitValue(datePicker, () => datePicker.Format, GetNativeFormat, format, nativeFormat); | ||
} | ||
[Theory(DisplayName = "Standard Format Strings Initialize Correctly")] | ||
[InlineData("D", "{dayofweek.full} {month.full} {day.integer} {year.full}")] | ||
[InlineData("f", "{dayofweek.full} {month.full} {day.integer}, {year.full} {hour.integer}:{minute.integer(2)} {period.abbreviated}")] | ||
[InlineData("F", "{dayofweek.full} {month.full} {day.integer}, {year.full} {hour.integer}:{minute.integer(2)}:{second.integer(2)} {period.abbreviated}")] | ||
[InlineData("m", "{month.full} {day.integer}")] | ||
[InlineData("M", "{month.full} {day.integer}")] | ||
[InlineData("r", "{dayofweek.abbreviated}, {day.integer(2)} {month.abbreviated} {year.full} {hour.integer(2)}:{minute.integer(2)}:{second.integer(2)} GMT")] | ||
[InlineData("R", "{dayofweek.abbreviated}, {day.integer(2)} {month.abbreviated} {year.full} {hour.integer(2)}:{minute.integer(2)}:{second.integer(2)} GMT")] | ||
[InlineData("s", "{year.full}-{month.integer(2)}-{day.integer(2)}T{hour.integer(2)}:{minute.integer(2)}:{second.integer(2)}")] | ||
[InlineData("U", "{dayofweek.full} {month.full} {day.integer} {year.full} {hour.integer(2)}:{minute.integer(2)}:{second.integer(2)}")] | ||
[InlineData("y", "{year.full} {month.full}")] | ||
[InlineData("Y", "{year.full} {month.full}")] | ||
[InlineData("g", "{month.integer}/{day.integer}/{year.abbreviated} {hour.integer}:{minute.integer(2)} {period.abbreviated}")] | ||
[InlineData("G", "{month.integer}/{day.integer}/{year.abbreviated} {hour.integer}:{minute.integer(2)}:{second.integer(2)} {period.abbreviated}")] | ||
public async Task StandardFormatInitializesCorrectly(string format, string nativeFormat) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test is failing in this case: Standard Format Strings Initialize Correctly(format: "F", nativeFormat: "{dayofweek.full} {month.full} {day.integer}, {year"···)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jsuarezruiz ,I have addressed the testcase failure. Let me know if anything else needs adjustment. |
||
{ | ||
var datePicker = new DatePickerStub(); | ||
|
||
datePicker.Date = new DateTime(2025, 12, 25); | ||
datePicker.MinimumDate = DateTime.Today.AddDays(-1); | ||
datePicker.MaximumDate = DateTime.Today.AddDays(1); | ||
// Use a specific date to ensure consistent results | ||
datePicker.Format = format; | ||
|
||
await ValidatePropertyInitValue(datePicker, () => datePicker.Format, GetNativeFormat, format, nativeFormat); | ||
} | ||
|
||
[Theory(DisplayName = "Standard Format Strings That Use Default Initialize Correctly")] | ||
[InlineData("d", "")] | ||
public async Task StandardFormatDefaultInitializesCorrectly(string format, string nativeFormat) | ||
{ | ||
var datePicker = new DatePickerStub(); | ||
|
||
datePicker.Date = DateTime.Today; | ||
datePicker.MinimumDate = DateTime.Today.AddDays(-1); | ||
datePicker.MaximumDate = DateTime.Today.AddDays(1); | ||
datePicker.Format = format; | ||
|
||
await ValidatePropertyInitValue(datePicker, () => datePicker.Format, GetNativeFormat, format, nativeFormat); | ||
} | ||
CalendarDatePicker GetNativeDatePicker(DatePickerHandler datePickerHandler) => | ||
datePickerHandler.PlatformView; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.