Completed
Last Updated: 08 May 2020 19:15 by ADMIN
Pedro
Created on: 08 May 2017 12:49
Category: DatePicker
Type: Feature Request
12
Disable user input on Datepicker
It should be possible to disable the user input on the Datepicker and the calendar pop-up only shows up if the user clicked on the "calendar button".
4 comments
ADMIN
Dimitar
Posted on: 08 May 2020 19:15

Hello,

The requested feature has been released in v4.3.0 of the @progress/kendo-angular-dateinputs package. The DatePicker, TimePicker and DateTimePicker now hold a readOnlyInput property, which when set to true, renders the inputs only in a read-only state, preventing the end user to type into it, or the mobile keyboard to open on focus. Here's a ref to the docs.

Regards,
Dimitar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
ADMIN
Dimiter Topalov
Posted on: 11 Apr 2019 08:47
Hello,

Thank you for the feedback. We will track the customer demand for this feature here, and prioritize accordingly based on the interest.

Meanwhile you can implement some custom logic to achieve the desired functionality. For example, to disable user interaction with the component only partially (e.g. INPUT element is disabled, but dates can be selected from the Calendar after clicking the respective icon), you can do so like so:

ngAfterViewChecked(): void {
      this.element.nativeElement.querySelector('.k-dateinput input').disabled = true;
    }

Additional logic that will disable the INPUT element based on the viewport width can be added like in the following example:

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

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.
Imported User
Posted on: 15 May 2018 16:55
Please! This is unusable on a mobile device otherwise. How can you pick a date if you lose half your screen?
Kelum
Posted on: 06 Dec 2017 15:25
also should be able to 'allow only picker option, and disable edit typing option in kendo-timepicker'