Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to close the datepicker after selecting date range? #351

Closed
ajithsimon opened this issue Sep 3, 2019 · 4 comments
Closed

How to close the datepicker after selecting date range? #351

ajithsimon opened this issue Sep 3, 2019 · 4 comments

Comments

@ajithsimon
Copy link

I have tried change-calendar and panel-change events, it wasn't working. Please help me with it.

@HuanVo
Copy link

HuanVo commented Sep 3, 2019

you can using
this.$refs.datepicker.closePopup();
to close it.

@ajithsimon
Copy link
Author

ajithsimon commented Sep 3, 2019

tried it, not working with date range picker.

@mengxiong10
Copy link
Owner

You can watch the value then close the popup when it is changed.

<date-picker v-model="value" ref="datepicker" range ></date-picker>
watch: {
   value (newDate, oldDate) {
        this.$refs.datepicker.closePopup()
   }
}

@ajithsimon
Copy link
Author

Thank you so much @mengxiong10 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants