Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

closed event not firing when clicking outside calendar without selecting a value

See original GitHub issue


I’m having troubles when trying to work with @closed event.

<datepicker :language='language' minimumView="month" maximumView="month" format="MM/yyyy"
  @closed="myAlert('closed')" input-class="col-12 form-control"/>

When I click on the input, @opened is triggers my function, but when I click outside without selecting any value, the functions attached to @closed or @closeCalendar are never invoked.

If I select an value, the @closed is triggered and my function is invoked.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:9
  • Comments:8

github_iconTop GitHub Comments

rathbomacommented, Nov 5, 2018

can we merge this PR?

fiedlcommented, Jul 10, 2020

Does anyone know a workaround?

EDIT: worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Calling a function when the datepicker closes, when I click ...
Here is the solution to your issues: You can set shouldCloseOnSelect to false to close date picker only when its click outside.
Read more >
Datepicker Widget - jQuery UI API Documentation
This widget manipulates its element's value programmatically, therefore a native change event may not be fired when the element's value changes. Creating a ......
Read more >
How to detect a click outside a React component
In this tutorial, learn a few ways how to implement click detection outside of both functional and class-based React components.
Read more >
Date Range Picker — JavaScript Date & Time Picker Library
This option will be highlighted whenever the current date range selection does not match one of the predefined ranges. Clicking it will display...
Read more >
Select function in Power Apps - Power Platform - Microsoft Learn
You can leave the default values for the OnSelect properties of most controls in the gallery if you want them to perform the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found