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

[HxInputDate] - When selected date year is out of the MinDate-MaxDate, year is not displayed #794

Open
jirikanda opened this issue Apr 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@jirikanda
Copy link
Contributor

  • Current date is in 2023.
  • Min&MaxDates are in 2024.
2024-04-22_12h54_47.mp4
@hakenr
Copy link
Member

hakenr commented Apr 22, 2024

@jirikanda @crdo What do we expect the component to do?

  • throw an exception on invalid parameters?
  • override the Min/Max parameters to include current value?
  • something else?

@jirikanda
Copy link
Contributor Author

jirikanda commented Apr 22, 2024

throw an exception on invalid parameters?

From my perspective, everything is valid.

  • User (in the past) entered some value which is saved in the database.
  • We are showing user's value and let the user fix the value to the current min-max date range.

@hakenr
Copy link
Member

hakenr commented Apr 22, 2024

throw an exception on invalid parameters?

From my perspective, everything is valid.

  • User (in the past) entered some value which is saved in the database.
  • We are showing user's value and let the user fix the value to the current min-max date range.

Not entirely sure, but you are probably right.

The current documentation/specification states "The first/last date selectable from the dropdown calendar." for the MinValue/MaxValue parameters. We could allow the Value to be outside these bounds, but the dropdown calendar will still only allow selections within the MinDate..MaxDate range (as far as I know, we don't use these boundaries for validation; it's up to the user to validate the value in the model). So technically, we can open a calendar dropdown for the month of the currently selected value, but still with "disabled" values (strikethrough).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants