fix date in data-grid binding local data sample#1001
Open
IGvaleries wants to merge 3 commits intovnextfrom
Open
fix date in data-grid binding local data sample#1001IGvaleries wants to merge 3 commits intovnextfrom
IGvaleries wants to merge 3 commits intovnextfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the initialization of today in the GetRandomDate method to use the current date rather than the default DateTime constructor.
- Replaced
new DateTime()withDateTime.Todayfor correct year retrieval in random date generation.
Comments suppressed due to low confidence (2)
samples/grids/data-grid/binding-local-data/App.razor:99
- Consider adding a unit test for GetRandomDate to verify that the returned date uses the current year and falls within the expected month and day range.
var today = DateTime.Today;
samples/grids/data-grid/binding-local-data/App.razor:97
- [nitpick] Add or update XML documentation for GetRandomDate to clarify that it generates a random DateTime within the current year using DateTime.Today.
public DateTime GetRandomDate()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.