Declined
Last Updated: 04 May 2023 06:25 by ADMIN
Nikola
Created on: 27 Jul 2018 09:50
Category: DatePicker
Type: Feature Request
2
DatePicker: Validation of incomplete input
If a DatePicker input is set to not required and a user enters an incomplete date like 05/day/2018, the component does not recognize the value and the input is null. This behaviour is ok, the problem is, that no validation is triggered.
In such a case, a validation error should be thrown such as "incomplete date" or "invalid", but nothing happens. To allow the form validation of an incomplete date, such a validation is needed.
3 comments
ADMIN
Dimiter Topalov
Posted on: 04 May 2023 06:25

Hello,

We are declining this request due to low customer demand.

Regards,
Dimiter Topalov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
ADMIN
Dimiter Topalov
Posted on: 18 Mar 2019 09:59
Hello,

Thank you for creating this feature request. We will track the customer demand here, and prioritize accordingly when updating our roadmap.

Meanwhile, I will share the currently available solution, previously discussed in a private support thread, so others can benefit too:

Access the internal properties of the DatePicker programmatically and apply some custom logic for differentiating between no input and partial input. Here is a sample implementation of the described approach (note that this is not officially supported):

https://plnkr.co/edit/oxh74XsC1ZdxqCTU2jXN?p=preview

Handle the blur event and access the string value of the underlying input via componentInstance.input.currentValue:

Apply the custom logic that will determine when the control should be invalidated:

if(stringValue.match(/[A-Za-z]/)) { // value contains a letter
        if(stringValue === 'month/day/year') { // value matches the empty placeholder
          // no value entered
          return;
        }
        // incomplete value entered
        form.controls['birthDate'].setErrors({'incomplete': true});
      }

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
gary
Posted on: 12 Mar 2019 04:08
Same case here, we need to validate the input format of both the date input and time input as users may not aware he has input the wrong format and the result data will be invalid in his perspective