File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/ui-date-time-input/src/DateTimeInput Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ class DateTimeInput extends Component<DateTimeInputProps, DateTimeInputState> {
277277 event . persist ( )
278278 // timeout is needed here because handleDayClick could be called in the same
279279 // frame, and it updates calendarSelectedDate which is read in here.
280- window . setTimeout ( ( ) => {
280+ setTimeout ( ( ) => {
281281 if ( ( event as React . KeyboardEvent ) . key === 'Enter' ) {
282282 // user pressed enter, use the selected value in the calendar
283283 this . updateStateBasedOnDateInput ( this . state . calendarSelectedDate , event )
@@ -355,7 +355,7 @@ class DateTimeInput extends Component<DateTimeInputProps, DateTimeInputState> {
355355 const newDate = newState . iso ?. toISOString ( )
356356 // Timeout is needed here because users might change value in the
357357 // onChange event lister, which might not execute properly
358- window . setTimeout ( ( ) => {
358+ setTimeout ( ( ) => {
359359 this . props . onChange ?.( e , newDate )
360360 } , 0 )
361361 }
@@ -375,7 +375,7 @@ class DateTimeInput extends Component<DateTimeInputProps, DateTimeInputState> {
375375 // happens on the target before the relatedTarget gets focus.
376376 // The timeout gives it a moment for that to happen
377377 if ( typeof this . props . onBlur === 'function' ) {
378- window . setTimeout ( ( ) => {
378+ setTimeout ( ( ) => {
379379 this . props . onBlur ?.( e )
380380 } , 0 )
381381 }
You can’t perform that action at this time.
0 commit comments