I’m using antd
RangePicker version 3.22.0. I’ve defined an onCalendarChange
function that given a single choice, forces the other choice, thus negating the need for a second click.
Problem is, the component still requires a second click which is not the behavior I’m interested in.
Is there any way to bypass this two click mechanism? I thought that by forcing values it would work but it doesn’t. Will triggering onChange
manually help?
Heres the code:
<DatePicker.RangePicker
dropdownClassName={props.customParams && "custom-date-picker"}
open={props.isOpen}
value={props.markedDate}
format={dateFormat}
disabledDate={props.customParams?.disabledDates ?? TimeUtils.isDateAfterToday}
showTime
onOk={props.onOk}
style={{opacity: 0}}
separator={""}
getCalendarContainer={props.calendarContainer}
onCalendarChange={props.onCalendarChange}
renderExtraFooter={props.renderExtraFooter}
dateRender={renderDate}
/>
Thanks!