Skip to content

Commit dcabc7b

Browse files
committed
add active className of input
1 parent 3215fe1 commit dcabc7b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/RangePicker.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,12 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
773773
style={style}
774774
{...getDataOrAriaProps(props)}
775775
>
776-
<div className={`${prefixCls}-input`} ref={startInputDivRef}>
776+
<div
777+
className={classNames(`${prefixCls}-input`, {
778+
[`${prefixCls}-input-active`]: activePickerIndex === 0,
779+
})}
780+
ref={startInputDivRef}
781+
>
777782
<input
778783
disabled={mergedDisabled[0]}
779784
readOnly={inputReadOnly || !startTyping}
@@ -787,7 +792,12 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
787792
/>
788793
</div>
789794
{separator}
790-
<div className={`${prefixCls}-input`} ref={startInputDivRef}>
795+
<div
796+
className={classNames(`${prefixCls}-input`, {
797+
[`${prefixCls}-input-active`]: activePickerIndex === 1,
798+
})}
799+
ref={startInputDivRef}
800+
>
791801
<input
792802
disabled={mergedDisabled[1]}
793803
readOnly={inputReadOnly || !endTyping}

0 commit comments

Comments
 (0)