question-mark
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.

Can i trigger open / close datepicker from method ?

See original GitHub issue

i want to trigger click open / close datepicker from method. At vue 2 i try to put ref at datepicker component and try to trigger click it from method like code below but nothing happened.

at component
<datepicker ref="datepick"></datepicker>

at method this.$refs.datepick.click();

any suggestions ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
adoniskrasniqicommented, May 7, 2019

This seems to be working. this.$refs.dataPicker.showDatepicker = true;

1reaction
kevpugcommented, Aug 17, 2021

In your case, boi87 it should work even if you have the error. Just put @ts ignore before the line so there’s no error. (Works for me)

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery Datepicker close datepicker after selected date
There are 2 ways to do this. One is to use autoclose property, the other (alternativ) way is to use the on change...
Read more >
How to trigger on close datepicker() event? - ACF Support
Approach so far. As you can see from the code below I've tried several ways to trigger this. None of them work (correctly)....
Read more >
Angular directives for Bootstrap - AngularUI
The open method returns a modal instance, an object with the following properties: close(result) (Type: function ) - Can be used to close...
Read more >
Close date picker after selecting the date - MDBootstrap
Hello, Is it possible to close date picker automatically once the date is selected there, so I don't need to click close button...
Read more >
API – pickadate.js - Amsul
Open and close the picker holder. To check if it's already open, use the get method. picker.open() picker.close() ...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found