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

Unable to define an optional DateOnly field in blazor EditForm using InputDate component #52195

Open
1 task done
nvmkpk opened this issue Nov 19, 2023 · 1 comment · May be fixed by #52499
Open
1 task done

Unable to define an optional DateOnly field in blazor EditForm using InputDate component #52195

nvmkpk opened this issue Nov 19, 2023 · 1 comment · May be fixed by #52499
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-model-binding Pillar: Technical Debt Priority:1 Work that is critical for the release, but we could probably ship without

Comments

@nvmkpk
Copy link

nvmkpk commented Nov 19, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am trying to bind a InputDate component to a nullable DateOnly property. When I click on the submit button, I see a validation message The value '' is not valid for 'Date'

Expected Behavior

Form should be submitted without any validation errors.

Steps To Reproduce

  1. Clone the project at https://github.com/nvmkpk/BlazorAppRepro1
  2. Run the project
  3. Click on Counter link on the left
  4. Click on Click me button
  5. Observe the validation error message

Exceptions (if any)

None

.NET Version

8.0.100

Anything else?

This only happens when not using any of the interactive modes. The form post sends empty string for the date field that cannot be parsed to a valid date on the server side.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Nov 19, 2023
@mkArtakMSFT mkArtakMSFT added bug This issue describes a behavior which is not expected - a bug. feature-model-binding Pillar: Technical Debt labels Dec 11, 2023
@mkArtakMSFT mkArtakMSFT added this to the Planning: WebUI milestone Dec 11, 2023
@ghost
Copy link

ghost commented Dec 18, 2023

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added the Priority:1 Work that is critical for the release, but we could probably ship without label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-model-binding Pillar: Technical Debt Priority:1 Work that is critical for the release, but we could probably ship without
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants