File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,6 @@ export default {
252
252
*/
253
253
selectedDate: null ,
254
254
slideDuration: 250 ,
255
- transitionName: ' ' ,
256
255
utils,
257
256
view: ' ' ,
258
257
}
@@ -476,7 +475,12 @@ export default {
476
475
* @param {Date} date
477
476
*/
478
477
handleTypedDate (date ) {
478
+ if (this .selectedDate ) {
479
+ this .setTransitionAndFocusDelay (this .selectedDate , date)
480
+ }
481
+
479
482
this .selectDate (date ? date .valueOf () : null )
483
+ this .reviewFocus ()
480
484
},
481
485
/**
482
486
* Focus the relevant element when the view changes
@@ -619,19 +623,6 @@ export default {
619
623
}
620
624
this .pageTimestamp = this .utils .setDate (new Date (dateTemp), 1 )
621
625
},
622
- /**
623
- * Sets the direction of the slide transition
624
- * @param {Number} plusOrMinus Positive for the future; negative for the past
625
- */
626
- setTransitionName (plusOrMinus ) {
627
- const isInTheFuture = plusOrMinus > 0
628
-
629
- if (this .isRtl ) {
630
- this .transitionName = isInTheFuture ? ' slide-left' : ' slide-right'
631
- } else {
632
- this .transitionName = isInTheFuture ? ' slide-right' : ' slide-left'
633
- }
634
- },
635
626
/**
636
627
* Sets the slide duration in milliseconds by looking up the stylesheet
637
628
*/
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export default {
12
12
navElementsFocusedIndex: 0 ,
13
13
resetTabbableCell: false ,
14
14
tabbableCell: null ,
15
+ transitionName: ' ' ,
15
16
}
16
17
},
17
18
computed: {
@@ -312,6 +313,19 @@ export default {
312
313
pickerCells .querySelector (' button.today:not(.muted):enabled' ) ||
313
314
pickerCells .querySelector (' button.cell:not(.muted):enabled' )
314
315
},
316
+ /**
317
+ * Sets the direction of the slide transition
318
+ * @param {Number} plusOrMinus Positive for the future; negative for the past
319
+ */
320
+ setTransitionName (plusOrMinus ) {
321
+ const isInTheFuture = plusOrMinus > 0
322
+
323
+ if (this .isRtl ) {
324
+ this .transitionName = isInTheFuture ? ' slide-left' : ' slide-right'
325
+ } else {
326
+ this .transitionName = isInTheFuture ? ' slide-right' : ' slide-left'
327
+ }
328
+ },
315
329
/**
316
330
* Tab backwards through the focus-trapped elements
317
331
*/
You can’t perform that action at this time.
0 commit comments