mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
e992682aa8
Fix #9267
29 lines
900 B
JavaScript
29 lines
900 B
JavaScript
/* eslint-disable import/prefer-default-export */
|
|
export function selectDate(wrapper, date, index) {
|
|
let calendar = wrapper;
|
|
if (index !== undefined) {
|
|
calendar = wrapper.find('.ant-calendar-range-part').at(index);
|
|
}
|
|
calendar.find({ title: date.format('LL'), role: 'gridcell' }).simulate('click');
|
|
}
|
|
|
|
export function hasSelected(wrapper, date) {
|
|
return wrapper.find({ title: date.format('LL'), role: 'gridcell' }).hasClass('ant-calendar-selected-day');
|
|
}
|
|
|
|
export function openPanel(wrapper) {
|
|
wrapper.find('.ant-calendar-picker-input').simulate('click');
|
|
}
|
|
|
|
export function clearInput(wrapper) {
|
|
wrapper.find('.ant-calendar-picker-clear').hostNodes().simulate('click');
|
|
}
|
|
|
|
export function nextYear(wrapper) {
|
|
wrapper.find('.ant-calendar-next-year-btn').simulate('click');
|
|
}
|
|
|
|
export function nextMonth(wrapper) {
|
|
wrapper.find('.ant-calendar-next-month-btn').simulate('click');
|
|
}
|