File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/form/RruDateTimeInput Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ const RruDateTimeInput: FC<RruDateTimeInputProps> = (props) => {
5050 const popupRef = useDetectClickOutside ( {
5151 onTriggered : ( e ) => {
5252 if ( e . target != inputRef . current ) {
53- closePopup ( ) ;
53+ setIsPopupShown ( false ) ;
5454 }
5555 } ,
5656 } ) ;
@@ -79,11 +79,6 @@ const RruDateTimeInput: FC<RruDateTimeInputProps> = (props) => {
7979 }
8080 } ;
8181
82- const closePopup = ( ) => {
83- setIsPopupShown ( false ) ;
84- field . onBlur ( ) ;
85- } ;
86-
8782 const previousMonth = ( ) => {
8883 if ( month === 1 ) {
8984 setYear ( year - 1 ) ;
@@ -107,7 +102,8 @@ const RruDateTimeInput: FC<RruDateTimeInputProps> = (props) => {
107102 return ;
108103 } else {
109104 setIntlDate ( date ) ;
110- closePopup ( ) ;
105+ setIsPopupShown ( false ) ;
106+ field . onBlur ( ) ;
111107 }
112108 } ;
113109
@@ -168,7 +164,7 @@ const RruDateTimeInput: FC<RruDateTimeInputProps> = (props) => {
168164 onIntegerInputChange ( matches [ 6 ] , 0 , 59 , setMinute ) ;
169165 onIntegerInputChange ( matches [ 7 ] , 0 , 59 , setSecond ) ;
170166 }
171- } else {
167+ } else {
172168 setYear ( today . getYear ( getCalendarType ( ) ) ) ;
173169 setMonth ( today . getMonth ( getCalendarType ( ) ) ) ;
174170 }
You can’t perform that action at this time.
0 commit comments