Won't Fix
Last Updated: 24 Sep 2024 11:41 by ADMIN
Ahmad
Created on: 24 Jan 2024 19:35
Category: UI for Blazor
Type: Bug Report
0
Max and Min in a DateOnly Datepicker are still a DateTime types

If the Datepicker's binded value is a DateOnly type, the Min and Max should follow that type.

3 comments
ADMIN
Dimo
Posted on: 24 Sep 2024 11:41

Hi Andrew,

Let me confirm that I understand your question correctly:

  • On one hand, the Min and Max parameters of the DatePicker do not deal with form validation. They are used only for internal DatePicker component algorithms.
  • On the other hand, I tested Min and Max parameters with a DateOnly Value and they indeed don't work as expected. In other words, the internal value autocorrect mechanism doesn't trigger and an out-of-range value is accepted. Thus I logged a new bug on your behalf and updated your Telerik points. At first glance, we can fix this without introducing a breaking change.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Andrew
Posted on: 20 Sep 2024 18:12

Question, and I'm not sure if this leads to the same answer or not, but:

If my bind-Value is a DateOnly, and I set my Max= to a DateTime as Telerik expects, no error message occurs, but No Validation occurs either.

Would supporting Min/Max validation on a bound DateOnly field be a code-breaking changing also, if I'm setting the Min/Max to a DateTime value??

ADMIN
Dimo
Posted on: 31 Jan 2024 13:35

Hello Ahmad,

Indeed, we considered identical Value, Min and Max parameter types when we added support for DateOnly. I agree with you that it makes complete sense. However, our research showed that this will require a breaking change and moreover, introduce too much complexity in our source code, which is not justified.

That's why we decided to leave the Min and Max type DateTime. By the way, some of our competitors follow the same approach.

I hope it will be easy for your app logic to accommodate this requirement.

Regards,
Dimo
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!