@@ -26,7 +26,7 @@ describe('DateInput', () => {
2626 className : 'react-date-picker__inputGroup' ,
2727 } ;
2828
29- let user ;
29+ let user : ReturnType < typeof userEvent . setup > ;
3030 beforeEach ( ( ) => {
3131 user = userEvent . setup ( {
3232 advanceTimers : vi . advanceTimersByTime . bind ( vi ) ,
@@ -308,7 +308,7 @@ describe('DateInput', () => {
308308 const { container } = render ( < DateInput { ...defaultProps } /> ) ;
309309
310310 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
311- const monthInput = customInputs [ 0 ] ;
311+ const monthInput = customInputs [ 0 ] as HTMLInputElement ;
312312 const dayInput = customInputs [ 1 ] ;
313313
314314 await user . type ( monthInput , '{arrowright}' ) ;
@@ -320,11 +320,13 @@ describe('DateInput', () => {
320320 const { container } = render ( < DateInput { ...defaultProps } /> ) ;
321321
322322 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
323- const monthInput = customInputs [ 0 ] ;
323+ const monthInput = customInputs [ 0 ] as HTMLInputElement ;
324324 const dayInput = customInputs [ 1 ] ;
325325
326- const separator = container . querySelector ( '.react-date-picker__inputGroup__divider' ) ;
327- const separatorKey = separator . textContent ;
326+ const separator = container . querySelector (
327+ '.react-date-picker__inputGroup__divider' ,
328+ ) as HTMLSpanElement ;
329+ const separatorKey = separator . textContent as string ;
328330
329331 await user . type ( monthInput , separatorKey ) ;
330332
@@ -335,7 +337,7 @@ describe('DateInput', () => {
335337 const { container } = render ( < DateInput { ...defaultProps } /> ) ;
336338
337339 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
338- const yearInput = customInputs [ 2 ] ;
340+ const yearInput = customInputs [ 2 ] as HTMLInputElement ;
339341
340342 await user . type ( yearInput , '{arrowright}' ) ;
341343
@@ -347,7 +349,7 @@ describe('DateInput', () => {
347349
348350 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
349351 const monthInput = customInputs [ 0 ] ;
350- const dayInput = customInputs [ 1 ] ;
352+ const dayInput = customInputs [ 1 ] as HTMLInputElement ;
351353
352354 await user . type ( dayInput , '{arrowleft}' ) ;
353355
@@ -358,7 +360,7 @@ describe('DateInput', () => {
358360 const { container } = render ( < DateInput { ...defaultProps } /> ) ;
359361
360362 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
361- const monthInput = customInputs [ 0 ] ;
363+ const monthInput = customInputs [ 0 ] as HTMLInputElement ;
362364
363365 await user . type ( monthInput , '{arrowleft}' ) ;
364366
@@ -369,7 +371,7 @@ describe('DateInput', () => {
369371 const { container } = render ( < DateInput { ...defaultProps } /> ) ;
370372
371373 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
372- const monthInput = customInputs [ 0 ] ;
374+ const monthInput = customInputs [ 0 ] as HTMLInputElement ;
373375 const dayInput = customInputs [ 1 ] ;
374376
375377 await user . type ( monthInput , '4' ) ;
@@ -381,7 +383,7 @@ describe('DateInput', () => {
381383 const { container } = render ( < DateInput { ...defaultProps } /> ) ;
382384
383385 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
384- const monthInput = customInputs [ 0 ] ;
386+ const monthInput = customInputs [ 0 ] as HTMLInputElement ;
385387 const dayInput = customInputs [ 1 ] ;
386388
387389 await user . type ( monthInput , '03' ) ;
@@ -393,7 +395,7 @@ describe('DateInput', () => {
393395 const { container } = render ( < DateInput { ...defaultProps } /> ) ;
394396
395397 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
396- const monthInput = customInputs [ 0 ] ;
398+ const monthInput = customInputs [ 0 ] as HTMLInputElement ;
397399
398400 await user . type ( monthInput , '1' ) ;
399401
@@ -407,7 +409,7 @@ describe('DateInput', () => {
407409 const { container } = render ( < DateInput { ...defaultProps } onChange = { onChange } value = { date } /> ) ;
408410
409411 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
410- const dayInput = customInputs [ 1 ] ;
412+ const dayInput = customInputs [ 1 ] as HTMLInputElement ;
411413
412414 fireEvent . change ( dayInput , { target : { value : '20' } } ) ;
413415
@@ -424,7 +426,7 @@ describe('DateInput', () => {
424426 const { container } = render ( < DateInput { ...defaultProps } onChange = { onChange } value = { date } /> ) ;
425427
426428 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
427- const dayInput = customInputs [ 1 ] ;
429+ const dayInput = customInputs [ 1 ] as HTMLInputElement ;
428430
429431 fireEvent . change ( dayInput , { target : { value : '20' } } ) ;
430432
@@ -445,7 +447,7 @@ describe('DateInput', () => {
445447 ) ;
446448
447449 const customInputs = container . querySelectorAll ( 'input[data-input]' ) ;
448- const dayInput = customInputs [ 0 ] ;
450+ const dayInput = customInputs [ 0 ] as HTMLInputElement ;
449451
450452 fireEvent . change ( dayInput , { target : { value : '20' } } ) ;
451453
@@ -477,7 +479,7 @@ describe('DateInput', () => {
477479
478480 const { container } = render ( < DateInput { ...defaultProps } onChange = { onChange } value = { date } /> ) ;
479481
480- const nativeInput = container . querySelector ( 'input[type="date"]' ) ;
482+ const nativeInput = container . querySelector ( 'input[type="date"]' ) as HTMLInputElement ;
481483
482484 fireEvent . change ( nativeInput , { target : { value : '2017-09-20' } } ) ;
483485
@@ -491,7 +493,7 @@ describe('DateInput', () => {
491493
492494 const { container } = render ( < DateInput { ...defaultProps } onChange = { onChange } value = { date } /> ) ;
493495
494- const nativeInput = container . querySelector ( 'input[type="date"]' ) ;
496+ const nativeInput = container . querySelector ( 'input[type="date"]' ) as HTMLInputElement ;
495497
496498 fireEvent . change ( nativeInput , { target : { value : '0019-09-20' } } ) ;
497499
@@ -509,7 +511,7 @@ describe('DateInput', () => {
509511
510512 const { container } = render ( < DateInput { ...defaultProps } onChange = { onChange } value = { date } /> ) ;
511513
512- const nativeInput = container . querySelector ( 'input[type="date"]' ) ;
514+ const nativeInput = container . querySelector ( 'input[type="date"]' ) as HTMLInputElement ;
513515
514516 fireEvent . change ( nativeInput , { target : { value : '' } } ) ;
515517
0 commit comments