File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 48
48
@keydown.enter.prevent =" handleKeydownEnter"
49
49
@keydown.esc.prevent =" clearDate"
50
50
@keydown.space =" handleKeydownSpace($event)"
51
- @keyup =" handleKeyup"
51
+ @keyup =" handleKeyup($event) "
52
52
@keyup.space =" handleKeyupSpace($event)"
53
53
/>
54
54
<!-- Clear Button -->
@@ -274,8 +274,22 @@ export default {
274
274
},
275
275
/**
276
276
* Parses a typed date and submits it, if valid
277
+ * @param {object} event Used to exclude certain keystrokes
277
278
*/
278
- handleKeyup () {
279
+ handleKeyup (event ) {
280
+ if (
281
+ [
282
+ ' Shift' ,
283
+ ' Tab' ,
284
+ ' ArrowUp' ,
285
+ ' ArrowDown' ,
286
+ ' ArrowLeft' ,
287
+ ' ArrowRight' ,
288
+ ].includes (event .key )
289
+ ) {
290
+ return
291
+ }
292
+
279
293
if (this .input .value === ' ' ) {
280
294
this .$emit (' typed-date' , null )
281
295
return
You can’t perform that action at this time.
0 commit comments