Skip to content
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

🐛 fix(DatePicker): Incorrect year value when Locale="fa-IR" #2099

Merged
merged 1 commit into from
Aug 12, 2024
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
1 change: 1 addition & 0 deletions src/Masa.Blazor/Components/DatePicker/MDatePicker.razor
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
Min="@MinYear"
Max="@MaxYear"
Value="@TableYear"
TableDate="@TableDate"
Locale="@CurrentLocale"
Type="@Type"
OnInput="@OnYearClickAsync"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class="@GetClass(CssClassUtils.GetTextColor(color), active ? "active" : null)"
style="@(StyleBuilder.Create().AddTextColor(color))"
@onclick="@(() => HandleOnYearItemClickAsync(year))">
@Formatter(new DateOnly(year, 1, 1))
@Formatter(new DateOnly(year, TableDate.Month, TableDate.Day))
</li>
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public partial class MDatePickerYears : MasaComponentBase

[Parameter] public int Value { get; set; }

// for issue #2097
[Parameter] public DateOnly TableDate { get; set; }

[Parameter] public EventCallback<int> OnInput { get; set; }

[Parameter] public EventCallback<int> OnYearClick { get; set; }
Expand Down
Loading