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

Question: how to prevent datepicker from closing after props.updateValue call #118

Closed
maksnester opened this issue Apr 4, 2018 · 1 comment
Assignees

Comments

@maksnester
Copy link

What if I want to implement immediate reaction on user input with keyup instead of change input event? Then I can't prevent calendar from closing after valid input. Even with :popover-keep-visible-on-input option (however I don't want to use this option, because I still need the popover to close if datePicker was used instead input.

@nathanreyes
Copy link
Owner

nathanreyes commented Apr 12, 2018

In v0.9.3, you can provide a second object parameter to updateValue, which is an object with the following properties.

Property Description Default Value
formatInput If new value is valid, date picker should reformat the inputValue (based on formats.input). true
hidePopover If new value is valid, date picker should hide popover. !popoverKeepVisibleOnInput

So, by default, without using a custom input slot, v-date-picker will have the following behavior when the input control has focus

Action Update w/ Value formatInput hidePopover
input event Input value if update-on-input === true. None otherwise. false false
change event Input value true false
esc keyup Last value (input ignored) true true

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

No branches or pull requests

2 participants