Declined
Last Updated: 18 Sep 2024 10:16 by ADMIN
Laura
Created on: 16 Sep 2024 08:19
Category: Kendo UI® for Vue
Type: Bug Report
0
Calendar component does not close on click outside the component

Describe the bug

When the Datepicker component is used with a custom calendar (Kendo Calendar component) the calendar does not close on click outside of the component

To Reproduce

1. Open this StackBlitz example - https://codesandbox.io/p/sandbox/festive-tesla-hm596x 
2. Click on the Datepicker input to open the component
3. Click outside the Calendar component

Expected behavior
The DatePicker's calendar popup should close when the user clicks outside the component

1 comment
ADMIN
Vessy
Posted on: 18 Sep 2024 10:16

Hello, Laura,

Thanks a lot for contacting us.

The implementation of the custom templates for our components gives the developer the freedom to implement the desired behavior on their own, therefore the built-in event handlers are not consumed by the custom components. 

In a custom Calendar scenario, you could assign a click handler to the document element and managed the `show` prop of the DatePicker based on that:

When you start using the `show` prop in controlled mode, you might also want to implement a custom toggle button as well and update the `show` value in its click event as well:

I hope the provided information will be helpful for you. In case you need further assistance on this matter, please open a primary support ticket with your inquiry and we will assist you on it.

Regards,
Vessy
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.