SamProf/MatBlazor

DatePicker - Setting Maximum to Today does not allow selection of today as the date

ralfbalzer opened this issue · 3 comments

When I set "Maximum="@DateTime.Today", the dropdown calender shows todays as a selectable date but clicking it, does not select the date.

Screenshot 2021-07-23 134442

@SamProf It looks like combination of flags Maximum="@DateTime.Today" EnableTime="true"
Example: https://blazorfiddle.com/s/fb3expdj

@enginexon your comment made me think and I found the solution. I need to use Maximum="@DateTime.Now" instead of @DateTime.Today. Today obvioulsly only retruns the date. DateTime,Now allows the picking of the date as long as the time is before the current time.
Thanks for your help :-)

@ralfbalzer You are welcome. I am glad that accidentally helped you to solve the issue.