mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 06:09:34 +08:00
98387ad819
If not control Calendar value, the internal value of Calendar will keep a different date than parent component.
9 lines
277 B
JavaScript
9 lines
277 B
JavaScript
/* eslint-disable import/prefer-default-export */
|
|
export function selectDate(wrapper, date, index) {
|
|
let calendar = wrapper;
|
|
if (index) {
|
|
calendar = wrapper.find('.ant-calendar-range-part')[index];
|
|
}
|
|
calendar.find({ title: date.format('LL') }).simulate('click');
|
|
}
|