test: update test
parent
5757be5150
commit
4b3ec6801f
|
@ -69,7 +69,7 @@ exports[`Cascader can be selected 3`] = `
|
|||
exports[`Cascader popup correctly when panel is open 1`] = `
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft">
|
||||
<div class="ant-cascader-menus" style="opacity: 0; pointer-events: none;">
|
||||
<div>
|
||||
<ul class="ant-cascader-menu">
|
||||
<li class="ant-cascader-menu-item ant-cascader-menu-item-expand" title="Zhejiang" role="menuitem">Zhejiang<span class="ant-cascader-menu-item-expand-icon"><span role="img" aria-label="right" class="anticon anticon-right"><svg focusable="false" class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path></svg></span></span>
|
||||
|
@ -87,7 +87,7 @@ exports[`Cascader popup correctly when panel is open 1`] = `
|
|||
exports[`Cascader popup correctly with defaultValue 1`] = `
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-cascader-menus ant-cascader-menus-placement-bottomLeft">
|
||||
<div class="ant-cascader-menus" style="opacity: 0; pointer-events: none;">
|
||||
<div>
|
||||
<ul class="ant-cascader-menu">
|
||||
<li class="ant-cascader-menu-item ant-cascader-menu-item-expand ant-cascader-menu-item-active" title="Zhejiang" role="menuitem">Zhejiang<span class="ant-cascader-menu-item-expand-icon"><span role="img" aria-label="right" class="anticon anticon-right"><svg focusable="false" class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"></path></svg></span></span>
|
||||
|
|
|
@ -1,17 +1,8 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
import moment from 'moment';
|
||||
import dayjs from 'dayjs';
|
||||
import MockDate from 'mockdate';
|
||||
import DatePicker from '..';
|
||||
import {
|
||||
selectDateFromBody,
|
||||
openPanel,
|
||||
clearInput,
|
||||
nextYear,
|
||||
nextMonth,
|
||||
hasSelected,
|
||||
$$,
|
||||
} from './utils';
|
||||
import focusTest from '../../../tests/shared/focusTest';
|
||||
|
||||
describe('DatePicker', () => {
|
||||
|
@ -19,7 +10,7 @@ describe('DatePicker', () => {
|
|||
|
||||
beforeEach(() => {
|
||||
document.body.outerHTML = '';
|
||||
MockDate.set(moment('2016-11-22'));
|
||||
MockDate.set(dayjs('2016-11-22'));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
@ -29,6 +20,7 @@ describe('DatePicker', () => {
|
|||
it('prop locale should works', async () => {
|
||||
const locale = {
|
||||
lang: {
|
||||
locale: 'mk',
|
||||
placeholder: 'Избери дата',
|
||||
rangePlaceholder: ['Начална дата', 'Крайна дата'],
|
||||
today: 'Днес',
|
||||
|
@ -61,7 +53,7 @@ describe('DatePicker', () => {
|
|||
placeholder: 'Избор на час',
|
||||
},
|
||||
};
|
||||
const birthday = moment('2000-01-01', 'YYYY-MM-DD');
|
||||
const birthday = dayjs('2000-01-01', 'YYYY-MM-DD');
|
||||
const wrapper = mount({
|
||||
render() {
|
||||
return <DatePicker open locale={locale} value={birthday} />;
|
||||
|
@ -71,119 +63,4 @@ describe('DatePicker', () => {
|
|||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
// Fix https://github.com/ant-design/ant-design/issues/8885
|
||||
it('control value after panel closed', async () => {
|
||||
const Test = {
|
||||
data() {
|
||||
return {
|
||||
cleared: false,
|
||||
value: moment(),
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onChange(value) {
|
||||
let cleared = this.cleared;
|
||||
|
||||
if (cleared) {
|
||||
value = moment(moment(value).format('YYYY-MM-DD 12:12:12'));
|
||||
cleared = false;
|
||||
}
|
||||
|
||||
if (!value) {
|
||||
cleared = true;
|
||||
}
|
||||
this.value = value;
|
||||
this.cleared = cleared;
|
||||
},
|
||||
},
|
||||
render() {
|
||||
return (
|
||||
<DatePicker
|
||||
showTime
|
||||
value={this.value}
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
onChange={this.onChange}
|
||||
/>
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
const wrapper = mount(Test, { sync: false, attachTo: 'body' });
|
||||
await asyncExpect(() => {
|
||||
// clear input
|
||||
clearInput(wrapper);
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
openPanel(wrapper);
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
// selectDateFromBody时(点击其它元素)没有触发input blur事件,强制执行blur
|
||||
$$('.ant-calendar-input')[0].blur();
|
||||
}, 0);
|
||||
await asyncExpect(() => {
|
||||
selectDateFromBody(moment('2016-11-13'));
|
||||
}, 0);
|
||||
await asyncExpect(() => {
|
||||
expect($$('.ant-calendar-input')[0].value).toBe('2016-11-13 12:12:12');
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
selectDateFromBody(moment('2016-11-14'));
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
expect($$('.ant-calendar-input')[0].value).toBe('2016-11-14 12:12:12');
|
||||
});
|
||||
});
|
||||
|
||||
it('triggers onChange only when date was selected', async () => {
|
||||
const handleChange = jest.fn();
|
||||
const wrapper = mount(
|
||||
{
|
||||
render() {
|
||||
return <DatePicker onChange={handleChange} />;
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
await asyncExpect(() => {
|
||||
openPanel(wrapper);
|
||||
}, 0);
|
||||
await asyncExpect(() => {
|
||||
nextYear();
|
||||
}, 1000);
|
||||
await asyncExpect(() => {
|
||||
expect(handleChange).not.toBeCalled();
|
||||
}, 0);
|
||||
await asyncExpect(() => {
|
||||
nextMonth();
|
||||
}, 0);
|
||||
await asyncExpect(() => {
|
||||
expect(handleChange).not.toBeCalled();
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
selectDateFromBody(moment('2017-12-22'));
|
||||
}, 1000);
|
||||
await asyncExpect(() => {
|
||||
expect(handleChange).toBeCalled();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
it('clear input', async () => {
|
||||
const wrapper = mount(DatePicker, { sync: false, attachTo: 'body' });
|
||||
await asyncExpect(() => {
|
||||
openPanel(wrapper);
|
||||
}, 0);
|
||||
await asyncExpect(() => {
|
||||
selectDateFromBody(moment('2016-11-23'));
|
||||
}, 100);
|
||||
await asyncExpect(() => {
|
||||
clearInput(wrapper);
|
||||
}, 1000);
|
||||
await asyncExpect(() => {
|
||||
openPanel(wrapper);
|
||||
}, 0);
|
||||
await asyncExpect(() => {
|
||||
expect(hasSelected(wrapper, moment('2016-11-22'))).toBe(true);
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
import moment from 'moment';
|
||||
import DatePicker from '..';
|
||||
import focusTest from '../../../tests/shared/focusTest';
|
||||
import { openPanel, $$ } from './utils';
|
||||
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
describe('MonthPicker', () => {
|
||||
focusTest(MonthPicker);
|
||||
it('reset select item when popup close', async () => {
|
||||
const wrapper = mount(MonthPicker, {
|
||||
props: { value: moment('2018-07-01') },
|
||||
sync: false,
|
||||
attachTo: 'body',
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
openPanel(wrapper);
|
||||
}, 0);
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-month-panel-month')[0].click();
|
||||
$$('.ant-calendar-month-panel-cell')[6]
|
||||
.getAttribute('class')
|
||||
.split(' ')
|
||||
.includes('ant-calendar-month-panel-selected-cell');
|
||||
}, 1000);
|
||||
});
|
||||
});
|
|
@ -0,0 +1,17 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import DatePicker from '..';
|
||||
import focusTest from '../../../tests/shared/focusTest';
|
||||
|
||||
const { QuarterPicker } = DatePicker;
|
||||
|
||||
describe('QuarterPicker', () => {
|
||||
focusTest(QuarterPicker);
|
||||
fit('reset select item when popup close', async () => {
|
||||
const wrapper = mount(DatePicker, {
|
||||
props: { style: { width: '400px' }, picker: 'quarter' },
|
||||
sync: false,
|
||||
attachTo: 'body',
|
||||
});
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
});
|
|
@ -1,9 +1,9 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
import moment from 'moment';
|
||||
import dayjs from 'dayjs';
|
||||
import DatePicker from '../';
|
||||
import { setMockDate, resetMockDate } from '../../../tests/utils';
|
||||
import { selectDateFromBody, $$ } from './utils';
|
||||
import { setMockDate, resetMockDate, sleep } from '../../../tests/utils';
|
||||
import { openPicker, selectCell, closePicker } from './utils';
|
||||
import focusTest from '../../../tests/shared/focusTest';
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
|
@ -19,12 +19,37 @@ describe('RangePicker', () => {
|
|||
afterEach(() => {
|
||||
resetMockDate();
|
||||
});
|
||||
// issue: https://github.com/ant-design/ant-design/issues/5872
|
||||
it('should not throw error when value is reset to `[]`', async () => {
|
||||
const birthday = dayjs('2000-01-01', 'YYYY-MM-DD');
|
||||
const wrapper = mount(
|
||||
{
|
||||
props: ['value'],
|
||||
setup(props) {
|
||||
return () => <RangePicker value={props.value} open />;
|
||||
},
|
||||
},
|
||||
{ attachTo: 'body', sync: 'false' },
|
||||
);
|
||||
wrapper.setProps({ value: [birthday, birthday] });
|
||||
wrapper.setProps({ value: [] });
|
||||
await sleep(0);
|
||||
expect(() => {
|
||||
openPicker(wrapper);
|
||||
selectCell(wrapper, 3);
|
||||
closePicker(wrapper);
|
||||
|
||||
openPicker(wrapper, 1);
|
||||
selectCell(wrapper, 5, 1);
|
||||
closePicker(wrapper, 1);
|
||||
}).not.toThrow();
|
||||
});
|
||||
|
||||
it('show month panel according to value', async () => {
|
||||
const birthday = moment('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
|
||||
const birthday = dayjs('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
|
||||
const wrapper = mount(RangePicker, {
|
||||
props: {
|
||||
getCalendarContainer: trigger => trigger,
|
||||
getPopupContainer: trigger => trigger,
|
||||
format: 'YYYY/MM/DD',
|
||||
showTime: true,
|
||||
open: true,
|
||||
|
@ -40,310 +65,8 @@ describe('RangePicker', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('switch to corresponding month panel when click presetted ranges', async () => {
|
||||
const birthday = moment('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
|
||||
const wrapper = mount(
|
||||
{
|
||||
render() {
|
||||
return (
|
||||
<RangePicker
|
||||
ranges={{
|
||||
'My Birthday': [birthday, birthday],
|
||||
}}
|
||||
getCalendarContainer={trigger => trigger}
|
||||
format="YYYY/MM/DD"
|
||||
showTime
|
||||
open
|
||||
/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-range-quick-selector .ant-tag')[0].click();
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
it('highlight range when hover presetted range', async () => {
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return (
|
||||
<RangePicker
|
||||
ranges={{
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
}}
|
||||
getCalendarContainer={trigger => trigger}
|
||||
format="YYYY/MM/DD"
|
||||
open
|
||||
/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-range-quick-selector .ant-tag')[0].dispatchEvent(
|
||||
new MouseEvent('mouseenter'),
|
||||
);
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
expect($$('.ant-calendar-selected-day').length).toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
it('should trigger onCalendarChange when change value', async () => {
|
||||
const onCalendarChangeFn = jest.fn();
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return (
|
||||
<RangePicker
|
||||
getCalendarContainer={trigger => trigger}
|
||||
onCalendarChange={onCalendarChangeFn}
|
||||
open
|
||||
/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-cell')[15].click();
|
||||
});
|
||||
expect(onCalendarChangeFn).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
// issue: https://github.com/ant-design/ant-design/issues/5872
|
||||
it('should not throw error when value is reset to `[]`', async () => {
|
||||
const birthday = moment('2000-01-01', 'YYYY-MM-DD');
|
||||
const wrapper = mount(RangePicker, {
|
||||
props: {
|
||||
getCalendarContainer: trigger => trigger,
|
||||
value: [birthday, birthday],
|
||||
open: true,
|
||||
},
|
||||
sync: false,
|
||||
attachTo: 'body',
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
wrapper.setProps({ value: [] });
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
expect(() => {
|
||||
const cell = $$('.ant-calendar-cell')[15];
|
||||
cell.click();
|
||||
cell.click();
|
||||
}).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
// issue: https://github.com/ant-design/ant-design/issues/7077
|
||||
it('should not throw error when select after clear', async () => {
|
||||
mount(RangePicker, {
|
||||
props: {
|
||||
getCalendarContainer: trigger => trigger,
|
||||
open: true,
|
||||
},
|
||||
sync: false,
|
||||
attachTo: 'body',
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
const cell = $$('.ant-calendar-cell')[15];
|
||||
cell.click();
|
||||
cell.click();
|
||||
});
|
||||
$$('.ant-calendar-picker-clear')[0].click();
|
||||
$$('.ant-calendar-picker-input')[0].click();
|
||||
|
||||
await asyncExpect(() => {
|
||||
expect(() => {
|
||||
const cell = $$('.ant-calendar-cell')[15];
|
||||
cell.click();
|
||||
cell.click();
|
||||
}).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
it('clear hover value after panel close', async () => {
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<RangePicker value={[moment(), moment().add(2, 'day')]} />
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-picker-input')[0].click();
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-cell')[25].click();
|
||||
$$('.ant-calendar-cell')[27].dispatchEvent(new MouseEvent('mouseenter'));
|
||||
document.dispatchEvent(new MouseEvent('mousedown'));
|
||||
}, 500);
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-picker-input')[0].click();
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
expect($$('.ant-calendar-cell')[23].getAttribute('class').split(' ')).toContain(
|
||||
'ant-calendar-in-range-cell',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('preset range', () => {
|
||||
beforeEach(() => {
|
||||
document.body.outerHTML = '';
|
||||
});
|
||||
it('static range', async () => {
|
||||
const range = [moment().subtract(2, 'd'), moment()];
|
||||
const format = 'YYYY-MM-DD HH:mm:ss';
|
||||
const wrapper = mount(RangePicker, {
|
||||
props: {
|
||||
ranges: { 'recent two days': range },
|
||||
format,
|
||||
},
|
||||
sync: false,
|
||||
attachTo: 'body',
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-picker-input')[0].click();
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-range-quick-selector .ant-tag')[0].click();
|
||||
}, 500);
|
||||
await asyncExpect(() => {
|
||||
expect(wrapper.findAll('.ant-calendar-range-picker-input')[0].element.value).toBe(
|
||||
range[0].format(format),
|
||||
);
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
const inputs = wrapper.findAll('.ant-calendar-range-picker-input');
|
||||
expect(inputs[inputs.length - 1].element.value).toBe(range[1].format(format));
|
||||
});
|
||||
await asyncExpect(() => {});
|
||||
});
|
||||
|
||||
it('function range', async () => {
|
||||
const range = [moment().subtract(2, 'd'), moment()];
|
||||
const format = 'YYYY-MM-DD HH:mm:ss';
|
||||
const wrapper = mount(RangePicker, {
|
||||
props: {
|
||||
ranges: { 'recent two days': () => range },
|
||||
format,
|
||||
},
|
||||
sync: false,
|
||||
attachTo: 'body',
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-picker-input')[0].click();
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-range-quick-selector .ant-tag')[0].click();
|
||||
}, 500);
|
||||
await asyncExpect(() => {
|
||||
expect(wrapper.findAll('.ant-calendar-range-picker-input')[0].element.value).toBe(
|
||||
range[0].format(format),
|
||||
);
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
const inputs = wrapper.findAll('.ant-calendar-range-picker-input');
|
||||
expect(inputs[inputs.length - 1].element.value).toBe(range[1].format(format));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// https://github.com/ant-design/ant-design/issues/6999
|
||||
it('input date manually', async () => {
|
||||
mount(RangePicker, { props: { open: true }, sync: false, attachTo: 'body' });
|
||||
const dateString = '2008-12-31';
|
||||
let input = null;
|
||||
await asyncExpect(() => {
|
||||
input = $$('.ant-calendar-input')[0];
|
||||
input.value = dateString;
|
||||
});
|
||||
expect($$('.ant-calendar-input')[0].value).toBe(dateString);
|
||||
});
|
||||
|
||||
it('triggers onOk when click on preset range', async () => {
|
||||
const handleOk = jest.fn();
|
||||
const range = [moment().subtract(2, 'd'), moment()];
|
||||
const wrapper = mount(RangePicker, {
|
||||
props: {
|
||||
ranges: { 'recent two days': range },
|
||||
onOk: handleOk,
|
||||
},
|
||||
sync: false,
|
||||
attachTo: 'body',
|
||||
});
|
||||
|
||||
await asyncExpect(() => {
|
||||
wrapper.find('.ant-calendar-picker-input').trigger('click');
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-range-quick-selector .ant-tag')[0].click();
|
||||
}, 500);
|
||||
await asyncExpect(() => {
|
||||
expect(handleOk).toBeCalledWith(range);
|
||||
});
|
||||
});
|
||||
|
||||
// https://github.com/ant-design/ant-design/issues/9267
|
||||
it('invali end date not throw error', async () => {
|
||||
const wrapper = mount(RangePicker, { sync: false, attachTo: 'body' });
|
||||
await asyncExpect(() => {
|
||||
wrapper.find('.ant-calendar-picker-input').trigger('click');
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
selectDateFromBody(moment('2017-09-18'), 0);
|
||||
selectDateFromBody(moment('2017-10-18'), 1);
|
||||
}, 500);
|
||||
await asyncExpect(() => {
|
||||
wrapper.find('.ant-calendar-picker-input').trigger('click');
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
const input = $$('.ant-calendar-input')[1];
|
||||
|
||||
expect(() => {
|
||||
input.value = '2016-01-01';
|
||||
}).not.toThrow();
|
||||
});
|
||||
});
|
||||
// https://github.com/ant-design/ant-design/issues/11631
|
||||
it('triggers onOpenChange when click on preset range', async () => {
|
||||
const handleOpenChange = jest.fn();
|
||||
const range = [moment().subtract(2, 'd'), moment()];
|
||||
const wrapper = mount(
|
||||
{
|
||||
render() {
|
||||
return (
|
||||
<RangePicker onOpenChange={handleOpenChange} ranges={{ 'recent two days': range }} />
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
sync: false,
|
||||
attachTo: 'body',
|
||||
},
|
||||
);
|
||||
await asyncExpect(() => {
|
||||
wrapper.find('.ant-calendar-picker-input').trigger('click');
|
||||
}, 0);
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-range-quick-selector .ant-tag')[0].click();
|
||||
}, 1000);
|
||||
await asyncExpect(() => {
|
||||
expect(handleOpenChange).toBeCalledWith(false);
|
||||
});
|
||||
it('customize separator', () => {
|
||||
const wrapper = mount(RangePicker, { props: { separator: 'test' } });
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`DatePicker prop locale should works 1`] = `<span class="ant-calendar-picker"><!--teleport start--><!--teleport end--><div><input readonly="" placeholder="Избери дата" class="ant-calendar-picker-input ant-input"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-calendar-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span role="img" aria-label="calendar" class="anticon anticon-calendar ant-calendar-picker-icon"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></div></span>`;
|
||||
exports[`DatePicker prop locale should works 1`] = `
|
||||
<!--teleport start-->
|
||||
<!--teleport end-->
|
||||
<div class="ant-picker">
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="Избери дата" title="2000-01-01" size="12" autocomplete="off"><span class="ant-picker-suffix"><span role="img" aria-label="calendar" class="anticon anticon-calendar"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></span><span class="ant-picker-clear" role="button"><span role="img" aria-label="close-circle" class="anticon anticon-close-circle"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span></span></div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`QuarterPicker reset select item when popup close 1`] = `
|
||||
<!---->
|
||||
<div class="ant-picker" style="width: 400px;">
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="Select quarter" title="" size="12" autocomplete="off"><span class="ant-picker-suffix"><span role="img" aria-label="calendar" class="anticon anticon-calendar"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></span>
|
||||
<!---->
|
||||
</div>
|
||||
</div>
|
||||
`;
|
|
@ -1,765 +1,223 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`RangePicker show month panel according to value 1`] = `
|
||||
<div data-v-app=""><span class="ant-calendar-picker" style="width: 350px;" tabindex="0"><!--teleport start--><!--teleport end--><span class="ant-calendar-picker-input ant-input"><input readonly="" placeholder="Start date" class="ant-calendar-range-picker-input" tabindex="-1"><span class="ant-calendar-range-picker-separator"> ~ </span><input readonly="" placeholder="End date" class="ant-calendar-range-picker-input" tabindex="-1"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-calendar-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span class="ant-calendar-picker-icon"><!----></span>
|
||||
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-calendar-picker-container ant-calendar-picker-container-placement-bottomLeft">
|
||||
<div class="ant-calendar-time ant-calendar-picker-container-content ant-calendar ant-calendar-range" tabindex="0">
|
||||
<!---->
|
||||
<div class="ant-calendar-panel">
|
||||
<!---->
|
||||
<div class="ant-calendar-date-panel">
|
||||
<div class="ant-calendar-range-part ant-calendar-range-left">
|
||||
<div class="ant-calendar-input-wrap">
|
||||
<div class="ant-calendar-date-input-wrap"><input class="ant-calendar-input " placeholder="Start date"></div>
|
||||
<!---->
|
||||
</div>
|
||||
<div style="outline: none;">
|
||||
<div class="ant-calendar-header">
|
||||
<div style="position: relative;"><a class="ant-calendar-prev-year-btn" role="button" title="Last year (Control + left)"></a><a class="ant-calendar-prev-month-btn" role="button" title="Previous month (PageUp)"></a><span class="ant-calendar-my-select"><a class="ant-calendar-month-select" role="button" title="Choose a month">1月</a><!----><a class="ant-calendar-year-select" role="button" title="Choose a year">2000</a></span>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<!---->
|
||||
<div class="ant-calendar-body">
|
||||
<table class="ant-calendar-table" cellspacing="0" role="grid">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<!---->
|
||||
<th role="columnheader" title="周一" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">一</span></th>
|
||||
<th role="columnheader" title="周二" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">二</span></th>
|
||||
<th role="columnheader" title="周三" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">三</span></th>
|
||||
<th role="columnheader" title="周四" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">四</span></th>
|
||||
<th role="columnheader" title="周五" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">五</span></th>
|
||||
<th role="columnheader" title="周六" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">六</span></th>
|
||||
<th role="columnheader" title="周日" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">日</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-calendar-tbody">
|
||||
<tr role="row" class="ant-calendar-active-week">
|
||||
<!---->
|
||||
<td role="gridcell" title="1999年12月27日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">27</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月28日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">28</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月29日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">29</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月30日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">30</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月31日" class="ant-calendar-cell ant-calendar-last-month-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">31</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月1日" class="ant-calendar-cell ant-calendar-selected-start-date ant-calendar-selected-end-date ant-calendar-selected-day">
|
||||
<div class="ant-calendar-date" aria-selected="true" aria-disabled="false">1</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月2日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">2</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月3日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月4日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月5日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">5</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月6日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">6</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月7日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">7</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月8日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">8</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月9日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">9</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月10日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">10</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月11日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">11</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月12日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">12</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月13日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">13</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月14日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">14</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月15日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">15</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月16日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">16</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月17日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">17</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月18日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">18</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月19日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">19</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月20日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">20</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月21日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">21</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月22日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">22</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月23日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">23</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月24日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">24</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月25日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">25</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月26日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">26</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月27日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">27</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月28日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">28</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月29日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">29</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月30日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">30</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月31日" class="ant-calendar-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">31</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月1日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">1</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月2日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">2</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月3日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月4日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月5日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">5</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月6日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">6</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div><span class="ant-calendar-range-middle">~</span>
|
||||
<div class="ant-calendar-range-part ant-calendar-range-right">
|
||||
<div class="ant-calendar-input-wrap">
|
||||
<div class="ant-calendar-date-input-wrap"><input class="ant-calendar-input " placeholder="End date"></div>
|
||||
<!---->
|
||||
</div>
|
||||
<div style="outline: none;">
|
||||
<div class="ant-calendar-header">
|
||||
<div style="position: relative;">
|
||||
<!---->
|
||||
<!----><span class="ant-calendar-my-select"><a class="ant-calendar-month-select" role="button" title="Choose a month">2月</a><!----><a class="ant-calendar-year-select" role="button" title="Choose a year">2000</a></span><a class="ant-calendar-next-month-btn" title="Next month (PageDown)"></a><a class="ant-calendar-next-year-btn" title="Next year (Control + right)"></a>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<!---->
|
||||
<div class="ant-calendar-body">
|
||||
<table class="ant-calendar-table" cellspacing="0" role="grid">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<!---->
|
||||
<th role="columnheader" title="周一" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">一</span></th>
|
||||
<th role="columnheader" title="周二" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">二</span></th>
|
||||
<th role="columnheader" title="周三" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">三</span></th>
|
||||
<th role="columnheader" title="周四" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">四</span></th>
|
||||
<th role="columnheader" title="周五" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">五</span></th>
|
||||
<th role="columnheader" title="周六" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">六</span></th>
|
||||
<th role="columnheader" title="周日" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">日</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-calendar-tbody">
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月31日" class="ant-calendar-cell ant-calendar-last-month-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">31</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月1日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">1</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月2日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">2</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月3日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月4日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月5日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">5</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月6日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">6</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年2月7日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">7</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月8日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">8</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月9日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">9</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月10日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">10</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月11日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">11</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月12日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">12</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月13日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">13</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年2月14日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">14</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月15日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">15</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月16日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">16</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月17日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">17</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月18日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">18</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月19日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">19</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月20日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">20</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年2月21日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">21</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月22日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">22</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月23日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">23</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月24日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">24</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月25日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">25</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月26日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">26</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月27日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">27</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年2月28日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">28</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月29日" class="ant-calendar-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">29</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月1日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">1</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月2日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">2</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月3日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月4日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月5日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">5</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年3月6日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">6</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月7日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">7</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月8日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">8</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月9日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">9</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月10日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">10</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月11日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">11</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月12日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">12</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-calendar-footer ant-calendar-range-bottom ant-calendar-footer-show-ok">
|
||||
<div class="ant-calendar-footer-btn">
|
||||
<!---->
|
||||
<!----><a class="ant-calendar-time-picker-btn" role="button">select time</a><a class="ant-calendar-ok-btn" role="button">Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div></span></span>
|
||||
exports[`RangePicker customize separator 1`] = `
|
||||
<!---->
|
||||
<div class="ant-picker ant-picker-range">
|
||||
<div class="ant-picker-input ant-picker-input-active"><input readonly="" placeholder="Start date" size="12" autocomplete="off"></div>
|
||||
<div class="ant-picker-range-separator">test</div>
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="End date" size="12" autocomplete="off"></div>
|
||||
<div class="ant-picker-active-bar" style="left: 0px; width: 0px; position: absolute;"></div><span class="ant-picker-suffix"><span role="img" aria-label="calendar" class="anticon anticon-calendar"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></span>
|
||||
<!---->
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`RangePicker switch to corresponding month panel when click presetted ranges 1`] = `
|
||||
<span class="ant-calendar-picker" style="width: 350px;" tabindex="0"><!--teleport start--><!--teleport end--><span class="ant-calendar-picker-input ant-input"><input readonly="" placeholder="Start date" class="ant-calendar-range-picker-input" tabindex="-1"><span class="ant-calendar-range-picker-separator"> ~ </span><input readonly="" placeholder="End date" class="ant-calendar-range-picker-input" tabindex="-1"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-calendar-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span class="ant-calendar-picker-icon"><!----></span>
|
||||
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-calendar-picker-container ant-calendar-picker-container-placement-bottomLeft">
|
||||
<div class="ant-calendar-time ant-calendar-range-with-ranges ant-calendar-picker-container-content ant-calendar ant-calendar-range" tabindex="0">
|
||||
exports[`RangePicker show month panel according to value 1`] = `
|
||||
<div data-v-app="">
|
||||
<!--teleport start-->
|
||||
<!--teleport end-->
|
||||
<div class="ant-picker ant-picker-range">
|
||||
<div class="ant-picker-input ant-picker-input-active"><input readonly="" placeholder="Start date" size="12" autocomplete="off"></div>
|
||||
<div class="ant-picker-range-separator"><span aria-label="to" class="ant-picker-separator"><span role="img" aria-label="swap-right" class="anticon anticon-swap-right"><svg focusable="false" class="" data-icon="swap-right" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="0 0 1024 1024"><path d="M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"></path></svg></span></span></div>
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="End date" size="12" autocomplete="off"></div>
|
||||
<div class="ant-picker-active-bar" style="left: 0px; width: 0px; position: absolute;"></div><span class="ant-picker-suffix"><span role="img" aria-label="calendar" class="anticon anticon-calendar"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></span>
|
||||
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-calendar-panel">
|
||||
<!---->
|
||||
<div class="ant-calendar-date-panel">
|
||||
<div class="ant-calendar-range-part ant-calendar-range-left">
|
||||
<div class="ant-calendar-input-wrap">
|
||||
<div class="ant-calendar-date-input-wrap"><input class="ant-calendar-input " placeholder="Start date"></div>
|
||||
<!---->
|
||||
</div>
|
||||
<div style="outline: none;">
|
||||
<div class="ant-calendar-header">
|
||||
<div style="position: relative;"><a class="ant-calendar-prev-year-btn" role="button" title="Last year (Control + left)"></a><a class="ant-calendar-prev-month-btn" role="button" title="Previous month (PageUp)"></a><span class="ant-calendar-my-select"><a class="ant-calendar-month-select" role="button" title="Choose a month">1月</a><!----><a class="ant-calendar-year-select" role="button" title="Choose a year">2000</a></span>
|
||||
<!---->
|
||||
<!---->
|
||||
<div class="ant-picker-dropdown ant-picker-dropdown-range" style="opacity: 0; pointer-events: none;">
|
||||
<div class="ant-picker-range-wrapper ant-picker-date-range-wrapper" style="min-width: 0px;">
|
||||
<div class="ant-picker-range-arrow" style="left: 0px;"></div>
|
||||
<div class="ant-picker-panel-container" style="margin-left: 0px;">
|
||||
<div class="ant-picker-panels">
|
||||
<div tabindex="0" class="ant-picker-panel ant-picker-panel-has-range ant-picker-panel-focused">
|
||||
<div class="ant-picker-datetime-panel">
|
||||
<div class="ant-picker-date-panel">
|
||||
<div class="ant-picker-header"><button type="button" tabindex="-1" class="ant-picker-header-super-prev-btn">«</button><button type="button" tabindex="-1" class="ant-picker-header-prev-btn">‹</button>
|
||||
<div class="ant-picker-header-view"><button type="button" tabindex="-1" class="ant-picker-month-btn">Jan</button><button type="button" tabindex="-1" class="ant-picker-year-btn">2000</button></div><button type="button" tabindex="-1" class="ant-picker-header-next-btn">›</button><button type="button" tabindex="-1" class="ant-picker-header-super-next-btn">»</button>
|
||||
</div>
|
||||
<div class="ant-picker-body">
|
||||
<table class="ant-picker-content">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Su</th>
|
||||
<th>Mo</th>
|
||||
<th>Tu</th>
|
||||
<th>We</th>
|
||||
<th>Th</th>
|
||||
<th>Fr</th>
|
||||
<th>Sa</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td title="1999-12-26" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">26</div>
|
||||
</td>
|
||||
<td title="1999-12-27" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">27</div>
|
||||
</td>
|
||||
<td title="1999-12-28" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">28</div>
|
||||
</td>
|
||||
<td title="1999-12-29" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">29</div>
|
||||
</td>
|
||||
<td title="1999-12-30" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">30</div>
|
||||
</td>
|
||||
<td title="1999-12-31" class="ant-picker-cell ant-picker-cell-end">
|
||||
<div class="ant-picker-cell-inner">31</div>
|
||||
</td>
|
||||
<td title="2000-01-01" class="ant-picker-cell ant-picker-cell-start ant-picker-cell-in-view ant-picker-cell-range-start ant-picker-cell-range-end ant-picker-cell-selected">
|
||||
<div class="ant-picker-cell-inner">1</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="2000-01-02" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">2</div>
|
||||
</td>
|
||||
<td title="2000-01-03" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">3</div>
|
||||
</td>
|
||||
<td title="2000-01-04" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">4</div>
|
||||
</td>
|
||||
<td title="2000-01-05" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">5</div>
|
||||
</td>
|
||||
<td title="2000-01-06" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">6</div>
|
||||
</td>
|
||||
<td title="2000-01-07" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">7</div>
|
||||
</td>
|
||||
<td title="2000-01-08" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">8</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="2000-01-09" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">9</div>
|
||||
</td>
|
||||
<td title="2000-01-10" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">10</div>
|
||||
</td>
|
||||
<td title="2000-01-11" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">11</div>
|
||||
</td>
|
||||
<td title="2000-01-12" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">12</div>
|
||||
</td>
|
||||
<td title="2000-01-13" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">13</div>
|
||||
</td>
|
||||
<td title="2000-01-14" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">14</div>
|
||||
</td>
|
||||
<td title="2000-01-15" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">15</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="2000-01-16" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">16</div>
|
||||
</td>
|
||||
<td title="2000-01-17" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">17</div>
|
||||
</td>
|
||||
<td title="2000-01-18" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">18</div>
|
||||
</td>
|
||||
<td title="2000-01-19" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">19</div>
|
||||
</td>
|
||||
<td title="2000-01-20" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">20</div>
|
||||
</td>
|
||||
<td title="2000-01-21" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">21</div>
|
||||
</td>
|
||||
<td title="2000-01-22" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">22</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="2000-01-23" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">23</div>
|
||||
</td>
|
||||
<td title="2000-01-24" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">24</div>
|
||||
</td>
|
||||
<td title="2000-01-25" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">25</div>
|
||||
</td>
|
||||
<td title="2000-01-26" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">26</div>
|
||||
</td>
|
||||
<td title="2000-01-27" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">27</div>
|
||||
</td>
|
||||
<td title="2000-01-28" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">28</div>
|
||||
</td>
|
||||
<td title="2000-01-29" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">29</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="2000-01-30" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">30</div>
|
||||
</td>
|
||||
<td title="2000-01-31" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">31</div>
|
||||
</td>
|
||||
<td title="2000-02-01" class="ant-picker-cell ant-picker-cell-start">
|
||||
<div class="ant-picker-cell-inner">1</div>
|
||||
</td>
|
||||
<td title="2000-02-02" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">2</div>
|
||||
</td>
|
||||
<td title="2000-02-03" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">3</div>
|
||||
</td>
|
||||
<td title="2000-02-04" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">4</div>
|
||||
</td>
|
||||
<td title="2000-02-05" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">5</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-picker-time-panel">
|
||||
<div class="ant-picker-header">
|
||||
<!---->
|
||||
<!---->
|
||||
<div class="ant-picker-header-view">2000/01/01</div>
|
||||
<!---->
|
||||
<!---->
|
||||
</div>
|
||||
<div class="ant-picker-content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<!---->
|
||||
<div class="ant-calendar-body">
|
||||
<table class="ant-calendar-table" cellspacing="0" role="grid">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<!---->
|
||||
<th role="columnheader" title="周一" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">一</span></th>
|
||||
<th role="columnheader" title="周二" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">二</span></th>
|
||||
<th role="columnheader" title="周三" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">三</span></th>
|
||||
<th role="columnheader" title="周四" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">四</span></th>
|
||||
<th role="columnheader" title="周五" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">五</span></th>
|
||||
<th role="columnheader" title="周六" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">六</span></th>
|
||||
<th role="columnheader" title="周日" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">日</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-calendar-tbody">
|
||||
<tr role="row" class="ant-calendar-active-week">
|
||||
<!---->
|
||||
<td role="gridcell" title="1999年12月27日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">27</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月28日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">28</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月29日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">29</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月30日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">30</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月31日" class="ant-calendar-cell ant-calendar-last-month-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">31</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月1日" class="ant-calendar-cell ant-calendar-selected-start-date ant-calendar-selected-end-date ant-calendar-selected-day">
|
||||
<div class="ant-calendar-date" aria-selected="true" aria-disabled="false">1</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月2日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">2</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月3日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月4日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月5日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">5</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月6日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">6</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月7日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">7</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月8日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">8</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月9日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">9</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月10日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">10</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月11日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">11</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月12日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">12</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月13日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">13</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月14日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">14</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月15日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">15</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月16日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">16</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月17日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">17</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月18日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">18</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月19日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">19</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月20日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">20</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月21日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">21</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月22日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">22</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月23日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">23</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月24日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">24</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月25日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">25</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月26日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">26</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月27日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">27</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月28日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">28</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月29日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">29</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月30日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">30</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月31日" class="ant-calendar-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">31</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月1日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">1</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月2日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">2</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月3日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月4日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月5日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">5</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月6日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">6</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div><span class="ant-calendar-range-middle">~</span>
|
||||
<div class="ant-calendar-range-part ant-calendar-range-right">
|
||||
<div class="ant-calendar-input-wrap">
|
||||
<div class="ant-calendar-date-input-wrap"><input class="ant-calendar-input " placeholder="End date"></div>
|
||||
<div class="ant-picker-footer">
|
||||
<!---->
|
||||
</div>
|
||||
<div style="outline: none;">
|
||||
<div class="ant-calendar-header">
|
||||
<div style="position: relative;">
|
||||
<!---->
|
||||
<!----><span class="ant-calendar-my-select"><a class="ant-calendar-month-select" role="button" title="Choose a month">2月</a><!----><a class="ant-calendar-year-select" role="button" title="Choose a year">2000</a></span><a class="ant-calendar-next-month-btn" title="Next month (PageDown)"></a><a class="ant-calendar-next-year-btn" title="Next year (Control + right)"></a>
|
||||
</div>
|
||||
<ul class="ant-picker-ranges">
|
||||
<!---->
|
||||
</div>
|
||||
<!---->
|
||||
<div class="ant-calendar-body">
|
||||
<table class="ant-calendar-table" cellspacing="0" role="grid">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<!---->
|
||||
<th role="columnheader" title="周一" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">一</span></th>
|
||||
<th role="columnheader" title="周二" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">二</span></th>
|
||||
<th role="columnheader" title="周三" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">三</span></th>
|
||||
<th role="columnheader" title="周四" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">四</span></th>
|
||||
<th role="columnheader" title="周五" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">五</span></th>
|
||||
<th role="columnheader" title="周六" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">六</span></th>
|
||||
<th role="columnheader" title="周日" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">日</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-calendar-tbody">
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年1月31日" class="ant-calendar-cell ant-calendar-last-month-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">31</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月1日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">1</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月2日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">2</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月3日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月4日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月5日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">5</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月6日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">6</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年2月7日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">7</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月8日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">8</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月9日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">9</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月10日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">10</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月11日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">11</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月12日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">12</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月13日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">13</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年2月14日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">14</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月15日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">15</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月16日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">16</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月17日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">17</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月18日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">18</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月19日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">19</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月20日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">20</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年2月21日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">21</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月22日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">22</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月23日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">23</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月24日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">24</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月25日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">25</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月26日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">26</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月27日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">27</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年2月28日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">28</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月29日" class="ant-calendar-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">29</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月1日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">1</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月2日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">2</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月3日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月4日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月5日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">5</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<!---->
|
||||
<td role="gridcell" title="2000年3月6日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">6</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月7日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">7</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月8日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">8</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月9日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">9</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月10日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">10</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月11日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">11</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年3月12日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date" aria-selected="false" aria-disabled="false">12</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<li class="ant-picker-ok"><button class="ant-btn ant-btn-primary ant-btn-sm" type="button">
|
||||
<!----><span>Ok</span>
|
||||
</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-calendar-footer ant-calendar-range-bottom ant-calendar-footer-show-ok">
|
||||
<div class="ant-calendar-footer-btn">
|
||||
<div class="ant-calendar-footer-extra ant-calendar-range-quick-selector"><span class="ant-tag ant-tag-blue">My Birthday<!----></span></div>
|
||||
<!---->
|
||||
<!----><a class="ant-calendar-time-picker-btn" role="button">select time</a><a class="ant-calendar-ok-btn" role="button">Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><span class="ant-picker-clear"><span role="img" aria-label="close-circle" class="anticon anticon-close-circle"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span></span>
|
||||
</div>
|
||||
</div></span></span>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`WeekPicker should support style prop 1`] = `<span class="ant-calendar-picker" style="width: 400px;"><!----><span style="display: inline-block; width: 100%;"><input readonly="" placeholder="Select date" class="ant-calendar-picker-input ant-input"><!----><span class="ant-calendar-picker-icon"><!----></span></span></span>`;
|
||||
exports[`WeekPicker should support style prop 1`] = `
|
||||
<!---->
|
||||
<div class="ant-picker" style="width: 400px;">
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="Select week" title="" size="12" autocomplete="off"><span class="ant-picker-suffix"><span role="img" aria-label="calendar" class="anticon anticon-calendar"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></span>
|
||||
<!---->
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -4,44 +4,65 @@ exports[`MonthPicker and WeekPicker render MonthPicker 1`] = `
|
|||
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-calendar-picker-container ant-calendar-picker-container-placement-bottomLeft">
|
||||
<div class="ant-calendar ant-calendar-month ant-calendar-picker-container-content ant-calendar-month-calendar" tabindex="0">
|
||||
<div class="ant-calendar-month-calendar-content">
|
||||
<div class="ant-calendar-month-header-wrap">
|
||||
<div class="ant-calendar-header">
|
||||
<div style="position: relative;"><a class="ant-calendar-prev-year-btn" role="button" title="Last year (Control + left)"></a><a class="ant-calendar-prev-month-btn" role="button" title="Previous month (PageUp)"></a><span class="ant-calendar-my-select"><a class="ant-calendar-month-select" role="button" title="Choose a month">1月</a><!----><a class="ant-calendar-year-select" role="button" title="Choose a year">2000</a></span><a class="ant-calendar-next-month-btn" title="Next month (PageDown)"></a><a class="ant-calendar-next-year-btn" title="Next year (Control + right)"></a></div>
|
||||
<div class="ant-calendar-month-panel">
|
||||
<div>
|
||||
<div class="ant-calendar-month-panel-header"><a class="ant-calendar-month-panel-prev-year-btn" role="button" title="Last year (Control + left)"></a><a class="ant-calendar-month-panel-year-select" role="button" title="Choose a year"><span class="ant-calendar-month-panel-year-select-content">2000</span><span class="ant-calendar-month-panel-year-select-arrow">x</span></a><a class="ant-calendar-month-panel-next-year-btn" role="button" title="Next year (Control + right)"></a></div>
|
||||
<div class="ant-calendar-month-panel-body">
|
||||
<table class="ant-calendar-month-panel-table" cellspacing="0" role="grid">
|
||||
<tbody class="ant-calendar-month-panel-tbody">
|
||||
<tr role="row">
|
||||
<td role="gridcell" title="一月" class="ant-calendar-month-panel-cell ant-calendar-month-panel-selected-cell"><a class="ant-calendar-month-panel-month">一月</a></td>
|
||||
<td role="gridcell" title="二月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">二月</a></td>
|
||||
<td role="gridcell" title="三月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">三月</a></td>
|
||||
</tr>
|
||||
<tr role="row">
|
||||
<td role="gridcell" title="四月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">四月</a></td>
|
||||
<td role="gridcell" title="五月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">五月</a></td>
|
||||
<td role="gridcell" title="六月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">六月</a></td>
|
||||
</tr>
|
||||
<tr role="row">
|
||||
<td role="gridcell" title="七月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">七月</a></td>
|
||||
<td role="gridcell" title="八月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">八月</a></td>
|
||||
<td role="gridcell" title="九月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">九月</a></td>
|
||||
</tr>
|
||||
<tr role="row">
|
||||
<td role="gridcell" title="十月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">十月</a></td>
|
||||
<td role="gridcell" title="十一月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">十一月</a></td>
|
||||
<td role="gridcell" title="十二月" class="ant-calendar-month-panel-cell"><a class="ant-calendar-month-panel-month">十二月</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ant-picker-dropdown" style="opacity: 0; pointer-events: none;">
|
||||
<div class="ant-picker-panel-container">
|
||||
<div tabindex="-1" class="ant-picker-panel ant-picker-panel-focused">
|
||||
<div class="ant-picker-month-panel">
|
||||
<div class="ant-picker-header"><button type="button" tabindex="-1" class="ant-picker-header-super-prev-btn"><span class="ant-picker-super-prev-icon"></span></button>
|
||||
<!---->
|
||||
<div class="ant-picker-header-view"><button type="button" class="ant-picker-year-btn">2000</button></div>
|
||||
<!----><button type="button" tabindex="-1" class="ant-picker-header-super-next-btn"><span class="ant-picker-super-next-icon"></span></button>
|
||||
</div>
|
||||
<div class="ant-picker-body">
|
||||
<table class="ant-picker-content">
|
||||
<!---->
|
||||
<tbody>
|
||||
<tr>
|
||||
<td title="2000-01" class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-selected">
|
||||
<div class="ant-picker-cell-inner">Jan</div>
|
||||
</td>
|
||||
<td title="2000-02" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Feb</div>
|
||||
</td>
|
||||
<td title="2000-03" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Mar</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="2000-04" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Apr</div>
|
||||
</td>
|
||||
<td title="2000-05" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">May</div>
|
||||
</td>
|
||||
<td title="2000-06" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Jun</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="2000-07" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Jul</div>
|
||||
</td>
|
||||
<td title="2000-08" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Aug</div>
|
||||
</td>
|
||||
<td title="2000-09" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Sep</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="2000-10" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Oct</div>
|
||||
</td>
|
||||
<td title="2000-11" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Nov</div>
|
||||
</td>
|
||||
<td title="2000-12" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">Dec</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!---->
|
||||
|
@ -56,185 +77,177 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
|
|||
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-calendar-picker-container ant-calendar-picker-container-placement-bottomLeft">
|
||||
<div class="ant-calendar ant-calendar-picker-container-content ant-calendar-week-number" tabindex="0">
|
||||
<!---->
|
||||
<div class="ant-calendar-panel">
|
||||
<!---->
|
||||
<div tabindex="0" class="ant-calendar-date-panel">
|
||||
<div class="ant-calendar-header">
|
||||
<div style="position: relative;"><a class="ant-calendar-prev-year-btn" role="button" title="Last year (Control + left)"></a><a class="ant-calendar-prev-month-btn" role="button" title="Previous month (PageUp)"></a><span class="ant-calendar-my-select"><a class="ant-calendar-month-select" role="button" title="Choose a month">1月</a><!----><a class="ant-calendar-year-select" role="button" title="Choose a year">2000</a></span><a class="ant-calendar-next-month-btn" title="Next month (PageDown)"></a><a class="ant-calendar-next-year-btn" title="Next year (Control + right)"></a></div>
|
||||
<!---->
|
||||
<div class="ant-picker-dropdown" style="opacity: 0; pointer-events: none;">
|
||||
<div class="ant-picker-panel-container">
|
||||
<div tabindex="-1" class="ant-picker-panel ant-picker-panel-focused">
|
||||
<div class="ant-picker-week-panel">
|
||||
<div class="ant-picker-header"><button type="button" tabindex="-1" class="ant-picker-header-super-prev-btn"><span class="ant-picker-super-prev-icon"></span></button><button type="button" tabindex="-1" class="ant-picker-header-prev-btn"><span class="ant-picker-prev-icon"></span></button>
|
||||
<div class="ant-picker-header-view"><button type="button" tabindex="-1" class="ant-picker-month-btn">Jan</button><button type="button" tabindex="-1" class="ant-picker-year-btn">2000</button></div><button type="button" tabindex="-1" class="ant-picker-header-next-btn"><span class="ant-picker-next-icon"></span></button><button type="button" tabindex="-1" class="ant-picker-header-super-next-btn"><span class="ant-picker-super-next-icon"></span></button>
|
||||
</div>
|
||||
<!---->
|
||||
<div class="ant-calendar-body">
|
||||
<table class="ant-calendar-table" cellspacing="0" role="grid">
|
||||
<div class="ant-picker-body">
|
||||
<table class="ant-picker-content">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th role="columnheader" class="ant-calendar-column-header ant-calendar-week-number-header"><span class="ant-calendar-column-header-inner">x</span></th>
|
||||
<th role="columnheader" title="周一" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">一</span></th>
|
||||
<th role="columnheader" title="周二" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">二</span></th>
|
||||
<th role="columnheader" title="周三" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">三</span></th>
|
||||
<th role="columnheader" title="周四" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">四</span></th>
|
||||
<th role="columnheader" title="周五" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">五</span></th>
|
||||
<th role="columnheader" title="周六" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">六</span></th>
|
||||
<th role="columnheader" title="周日" class="ant-calendar-column-header"><span class="ant-calendar-column-header-inner">日</span></th>
|
||||
<tr>
|
||||
<th aria-label="empty cell"></th>
|
||||
<th>Su</th>
|
||||
<th>Mo</th>
|
||||
<th>Tu</th>
|
||||
<th>We</th>
|
||||
<th>Th</th>
|
||||
<th>Fr</th>
|
||||
<th>Sa</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="ant-calendar-tbody">
|
||||
<tr role="row" class="ant-calendar-active-week">
|
||||
<td role="gridcell" class="ant-calendar-week-number-cell">52</td>
|
||||
<td role="gridcell" title="1999年12月27日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date">27</div>
|
||||
<tbody>
|
||||
<tr class="ant-picker-week-panel-row ant-picker-week-panel-row-selected">
|
||||
<td class="ant-picker-cell ant-picker-cell-week">1</td>
|
||||
<td title="1999-12-26" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">26</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月28日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date">28</div>
|
||||
<td title="1999-12-27" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">27</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月29日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date">29</div>
|
||||
<td title="1999-12-28" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">28</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月30日" class="ant-calendar-cell ant-calendar-last-month-cell">
|
||||
<div class="ant-calendar-date">30</div>
|
||||
<td title="1999-12-29" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">29</div>
|
||||
</td>
|
||||
<td role="gridcell" title="1999年12月31日" class="ant-calendar-cell ant-calendar-last-month-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date">31</div>
|
||||
<td title="1999-12-30" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">30</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月1日" class="ant-calendar-cell ant-calendar-selected-date ant-calendar-selected-day">
|
||||
<div class="ant-calendar-selected-day">
|
||||
<div class="ant-calendar-date">1</div>
|
||||
</div>
|
||||
<td title="1999-12-31" class="ant-picker-cell ant-picker-cell-end">
|
||||
<div class="ant-picker-cell-inner">31</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月2日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-selected-day">
|
||||
<div class="ant-calendar-date">2</div>
|
||||
</div>
|
||||
<td title="2000-01-01" class="ant-picker-cell ant-picker-cell-start ant-picker-cell-in-view ant-picker-cell-selected">
|
||||
<div class="ant-picker-cell-inner">1</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<td role="gridcell" class="ant-calendar-week-number-cell">1</td>
|
||||
<td role="gridcell" title="2000年1月3日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">3</div>
|
||||
<tr class="ant-picker-week-panel-row">
|
||||
<td class="ant-picker-cell ant-picker-cell-week">2</td>
|
||||
<td title="2000-01-02" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">2</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月4日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">4</div>
|
||||
<td title="2000-01-03" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月5日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">5</div>
|
||||
<td title="2000-01-04" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月6日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">6</div>
|
||||
<td title="2000-01-05" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">5</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月7日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">7</div>
|
||||
<td title="2000-01-06" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">6</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月8日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">8</div>
|
||||
<td title="2000-01-07" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">7</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月9日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">9</div>
|
||||
<td title="2000-01-08" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">8</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<td role="gridcell" class="ant-calendar-week-number-cell">2</td>
|
||||
<td role="gridcell" title="2000年1月10日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">10</div>
|
||||
<tr class="ant-picker-week-panel-row">
|
||||
<td class="ant-picker-cell ant-picker-cell-week">3</td>
|
||||
<td title="2000-01-09" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">9</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月11日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">11</div>
|
||||
<td title="2000-01-10" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">10</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月12日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">12</div>
|
||||
<td title="2000-01-11" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">11</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月13日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">13</div>
|
||||
<td title="2000-01-12" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">12</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月14日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">14</div>
|
||||
<td title="2000-01-13" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">13</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月15日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">15</div>
|
||||
<td title="2000-01-14" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">14</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月16日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">16</div>
|
||||
<td title="2000-01-15" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">15</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<td role="gridcell" class="ant-calendar-week-number-cell">3</td>
|
||||
<td role="gridcell" title="2000年1月17日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">17</div>
|
||||
<tr class="ant-picker-week-panel-row">
|
||||
<td class="ant-picker-cell ant-picker-cell-week">4</td>
|
||||
<td title="2000-01-16" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">16</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月18日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">18</div>
|
||||
<td title="2000-01-17" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">17</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月19日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">19</div>
|
||||
<td title="2000-01-18" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">18</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月20日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">20</div>
|
||||
<td title="2000-01-19" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">19</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月21日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">21</div>
|
||||
<td title="2000-01-20" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">20</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月22日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">22</div>
|
||||
<td title="2000-01-21" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">21</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月23日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">23</div>
|
||||
<td title="2000-01-22" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">22</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<td role="gridcell" class="ant-calendar-week-number-cell">4</td>
|
||||
<td role="gridcell" title="2000年1月24日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">24</div>
|
||||
<tr class="ant-picker-week-panel-row">
|
||||
<td class="ant-picker-cell ant-picker-cell-week">5</td>
|
||||
<td title="2000-01-23" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">23</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月25日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">25</div>
|
||||
<td title="2000-01-24" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">24</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月26日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">26</div>
|
||||
<td title="2000-01-25" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">25</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月27日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">27</div>
|
||||
<td title="2000-01-26" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">26</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月28日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">28</div>
|
||||
<td title="2000-01-27" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">27</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月29日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">29</div>
|
||||
<td title="2000-01-28" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">28</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年1月30日" class="ant-calendar-cell">
|
||||
<div class="ant-calendar-date">30</div>
|
||||
<td title="2000-01-29" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">29</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr role="row" class="">
|
||||
<td role="gridcell" class="ant-calendar-week-number-cell">5</td>
|
||||
<td role="gridcell" title="2000年1月31日" class="ant-calendar-cell ant-calendar-last-day-of-month">
|
||||
<div class="ant-calendar-date">31</div>
|
||||
<tr class="ant-picker-week-panel-row">
|
||||
<td class="ant-picker-cell ant-picker-cell-week">6</td>
|
||||
<td title="2000-01-30" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">30</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月1日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date">1</div>
|
||||
<td title="2000-01-31" class="ant-picker-cell ant-picker-cell-in-view">
|
||||
<div class="ant-picker-cell-inner">31</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月2日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date">2</div>
|
||||
<td title="2000-02-01" class="ant-picker-cell ant-picker-cell-start">
|
||||
<div class="ant-picker-cell-inner">1</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月3日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date">3</div>
|
||||
<td title="2000-02-02" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">2</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月4日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date">4</div>
|
||||
<td title="2000-02-03" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">3</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月5日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date">5</div>
|
||||
<td title="2000-02-04" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">4</div>
|
||||
</td>
|
||||
<td role="gridcell" title="2000年2月6日" class="ant-calendar-cell ant-calendar-next-month-btn-day">
|
||||
<div class="ant-calendar-date">6</div>
|
||||
<td title="2000-02-05" class="ant-picker-cell">
|
||||
<div class="ant-picker-cell-inner">5</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
<!---->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -242,10 +255,30 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
|
|||
</div>
|
||||
`;
|
||||
|
||||
exports[`Picker format by locale date 1`] = `<span class="ant-calendar-picker"><!----><div><input readonly="" placeholder="请选择日期" class="ant-calendar-picker-input ant-input"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-calendar-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span role="img" aria-label="calendar" class="anticon anticon-calendar ant-calendar-picker-icon"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></div></span>`;
|
||||
exports[`Picker format by locale date 1`] = `
|
||||
<!---->
|
||||
<div class="ant-picker">
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="请选择日期" title="2000-01-01" size="12" autocomplete="off"><span class="ant-picker-suffix"><span role="img" aria-label="calendar" class="anticon anticon-calendar"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></span><span class="ant-picker-clear" role="button"><span role="img" aria-label="close-circle" class="anticon anticon-close-circle"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span></span></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Picker format by locale dateTime 1`] = `<span class="ant-calendar-picker" style="min-width: 195px;"><!----><div><input readonly="" placeholder="请选择日期" class="ant-calendar-picker-input ant-input"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-calendar-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span role="img" aria-label="calendar" class="anticon anticon-calendar ant-calendar-picker-icon"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></div></span>`;
|
||||
exports[`Picker format by locale dateTime 1`] = `
|
||||
<!---->
|
||||
<div class="ant-picker">
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="请选择日期" title="2000-01-01 00:00:00" size="21" autocomplete="off"><span class="ant-picker-suffix"><span role="img" aria-label="calendar" class="anticon anticon-calendar"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></span><span class="ant-picker-clear" role="button"><span role="img" aria-label="close-circle" class="anticon anticon-close-circle"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span></span></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Picker format by locale month 1`] = `<span class="ant-calendar-picker"><!----><div><input readonly="" placeholder="请选择日期" class="ant-calendar-picker-input ant-input"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-calendar-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span role="img" aria-label="calendar" class="anticon anticon-calendar ant-calendar-picker-icon"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></div></span>`;
|
||||
exports[`Picker format by locale month 1`] = `
|
||||
<!---->
|
||||
<div class="ant-picker">
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="请选择月份" title="2000-01" size="12" autocomplete="off"><span class="ant-picker-suffix"><span role="img" aria-label="calendar" class="anticon anticon-calendar"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></span><span class="ant-picker-clear" role="button"><span role="img" aria-label="close-circle" class="anticon anticon-close-circle"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span></span></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Picker format by locale week 1`] = `<span class="ant-calendar-picker"><!----><span style="display: inline-block; width: 100%;"><input readonly="" placeholder="请选择日期" class="ant-calendar-picker-input ant-input"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-calendar-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span class="ant-calendar-picker-icon"><!----></span></span></span>`;
|
||||
exports[`Picker format by locale week 1`] = `
|
||||
<!---->
|
||||
<div class="ant-picker">
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="请选择周" title="2000-1st" size="12" autocomplete="off"><span class="ant-picker-suffix"><span role="img" aria-label="calendar" class="anticon anticon-calendar"><svg focusable="false" class="" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></span></span><span class="ant-picker-clear" role="button"><span role="img" aria-label="close-circle" class="anticon anticon-close-circle"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span></span></div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
import moment from 'moment';
|
||||
import dayjs from 'dayjs';
|
||||
import DatePicker from '../';
|
||||
import LocaleProvider from '../../locale-provider';
|
||||
import locale from '../../locale-provider/zh_CN';
|
||||
|
@ -20,7 +20,7 @@ describe('Picker format by locale', () => {
|
|||
},
|
||||
};
|
||||
|
||||
const date = moment('2000-01-01', 'YYYY-MM-DD');
|
||||
const date = dayjs('2000-01-01', 'YYYY-MM-DD');
|
||||
function matchPicker(name, Picker, props) {
|
||||
it(name, async () => {
|
||||
const wrapper = mount(
|
||||
|
@ -52,7 +52,7 @@ describe('MonthPicker and WeekPicker', () => {
|
|||
document.body.innerHTML = '';
|
||||
});
|
||||
it('render MonthPicker', async () => {
|
||||
const birthday = moment('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
|
||||
const birthday = dayjs('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
|
||||
const wrapper = mount(MonthPicker, { props: { open: true }, sync: false });
|
||||
await asyncExpect(() => {
|
||||
wrapper.setProps({ value: birthday });
|
||||
|
@ -64,7 +64,7 @@ describe('MonthPicker and WeekPicker', () => {
|
|||
});
|
||||
|
||||
it('render WeekPicker', async () => {
|
||||
const birthday = moment('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
|
||||
const birthday = dayjs('2000-01-01', 'YYYY-MM-DD').locale('zh-cn');
|
||||
const wrapper = mount(WeekPicker, { props: { open: false }, sync: false });
|
||||
await asyncExpect(() => {
|
||||
wrapper.setProps({ value: birthday, open: true });
|
||||
|
|
|
@ -1,178 +0,0 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
import moment from 'moment';
|
||||
import DatePicker from '../';
|
||||
import { $$ } from './utils';
|
||||
import { sleep } from '../../../tests/utils';
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
|
||||
describe('DatePicker with showTime', () => {
|
||||
beforeEach(() => {
|
||||
document.body.outerHTML = '';
|
||||
});
|
||||
it('should trigger onChange when select value', async () => {
|
||||
const onChangeFn = jest.fn();
|
||||
const onOpenChangeFn = jest.fn();
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return <DatePicker showTime open onChange={onChangeFn} onOpenChange={onOpenChangeFn} />;
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-date')[0].click();
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
expect(onChangeFn).toHaveBeenCalled();
|
||||
expect(onOpenChangeFn).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
it('should trigger onOk when press ok button', async () => {
|
||||
const onOkFn = jest.fn();
|
||||
const onOpenChangeFn = jest.fn();
|
||||
const onChangeFn = jest.fn();
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return (
|
||||
<DatePicker
|
||||
showTime
|
||||
open
|
||||
onChange={onChangeFn}
|
||||
onOk={onOkFn}
|
||||
onOpenChange={onOpenChangeFn}
|
||||
defaultValue={moment()}
|
||||
/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-ok-btn')[0].click();
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
expect(onOkFn).toHaveBeenCalled();
|
||||
expect(onOpenChangeFn).toHaveBeenCalledWith(false);
|
||||
expect(onChangeFn).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
it('should trigger onChange when click Now link', async () => {
|
||||
const onOpenChangeFn = jest.fn();
|
||||
const onChangeFn = jest.fn();
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return <DatePicker showTime open onChange={onChangeFn} onOpenChange={onOpenChangeFn} />;
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-today-btn')[0].click();
|
||||
});
|
||||
await asyncExpect(() => {
|
||||
expect(onOpenChangeFn).toHaveBeenCalledWith(false);
|
||||
expect(onChangeFn).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
it('should have correct className when use12Hours is true', async () => {
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return <DatePicker showTime={{ use12Hours: true }} open />;
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
|
||||
await asyncExpect(() => {
|
||||
expect($$('.ant-calendar-time-picker-column-4').length).toBe(0);
|
||||
});
|
||||
$$('.ant-calendar-today')[0].click();
|
||||
await sleep();
|
||||
$$('.ant-calendar-time-picker-btn')[0].click();
|
||||
await asyncExpect(() => {
|
||||
expect($$('.ant-calendar-time-picker-column-4').length).toBe(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('RangePicker with showTime', () => {
|
||||
beforeEach(() => {
|
||||
document.body.outerHTML = '';
|
||||
});
|
||||
it('should trigger onChange when select value', async () => {
|
||||
const onChangeFn = jest.fn();
|
||||
const onOpenChangeFn = jest.fn();
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return <RangePicker showTime open onChange={onChangeFn} onOpenChange={onOpenChangeFn} />;
|
||||
},
|
||||
},
|
||||
{ sync: false },
|
||||
);
|
||||
|
||||
await asyncExpect(() => {
|
||||
expect($$('.ant-calendar-time-picker-btn')[0].getAttribute('class').split(' ')).toContain(
|
||||
'ant-calendar-time-picker-btn-disabled',
|
||||
);
|
||||
expect($$('.ant-calendar-ok-btn')[0].getAttribute('class').split(' ')).toContain(
|
||||
'ant-calendar-ok-btn-disabled',
|
||||
);
|
||||
});
|
||||
$$('.ant-calendar-date')[10].click();
|
||||
$$('.ant-calendar-date')[11].click();
|
||||
await asyncExpect(() => {
|
||||
expect($$('.ant-calendar-time-picker-btn')[0].getAttribute('class').split(' ')).not.toContain(
|
||||
'ant-calendar-time-picker-btn-disabled',
|
||||
);
|
||||
expect($$('.ant-calendar-ok-btn')[0].getAttribute('class').split(' ')).not.toContain(
|
||||
'ant-calendar-ok-btn-disabled',
|
||||
);
|
||||
});
|
||||
expect(onChangeFn).toHaveBeenCalled();
|
||||
expect(onOpenChangeFn).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('hould trigger onOk when press ok button', async () => {
|
||||
const onOkFn = jest.fn();
|
||||
const onChangeFn = jest.fn();
|
||||
const onOpenChangeFn = jest.fn();
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return (
|
||||
<RangePicker
|
||||
showTime
|
||||
open
|
||||
onOk={onOkFn}
|
||||
onChange={onChangeFn}
|
||||
onOpenChange={onOpenChangeFn}
|
||||
/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
await asyncExpect(() => {
|
||||
$$('.ant-calendar-date')[10].click();
|
||||
$$('.ant-calendar-date')[11].click();
|
||||
});
|
||||
onChangeFn.mockClear();
|
||||
$$('.ant-calendar-ok-btn')[0].click();
|
||||
expect(onOkFn).toHaveBeenCalled();
|
||||
expect(onOpenChangeFn).toHaveBeenCalledWith(false);
|
||||
expect(onChangeFn).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
|
@ -32,3 +32,29 @@ export function selectDateFromBody(date, index) {
|
|||
}
|
||||
calendar.querySelector(`[title="${date.format('LL')}"][role="gridcell"]`).click();
|
||||
}
|
||||
|
||||
export function openPicker(wrapper, index = 0) {
|
||||
wrapper.findAll('input')[index].trigger('mousedown');
|
||||
wrapper.findAll('input')[index].trigger('focus');
|
||||
}
|
||||
export function closePicker(wrapper, index = 0) {
|
||||
wrapper.findAll('input')[index].trigger('blur');
|
||||
}
|
||||
|
||||
export function selectCell(wrapper, text, index = 0) {
|
||||
let matchCell;
|
||||
$$('table')
|
||||
[index].querySelectorAll('td')
|
||||
.forEach(td => {
|
||||
if (td.textContent === String(text) && td.className.includes('-in-view')) {
|
||||
matchCell = td;
|
||||
td.click('click');
|
||||
}
|
||||
});
|
||||
|
||||
if (!matchCell) {
|
||||
throw new Error('Cell not match in picker panel.');
|
||||
}
|
||||
|
||||
return matchCell;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,7 +16,7 @@ exports[`Slider should show tooltip when hovering slider handler 1`] = `
|
|||
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-tooltip ant-slider-tooltip ant-tooltip-placement-top">
|
||||
<div class="ant-tooltip ant-slider-tooltip" style="opacity: 0; pointer-events: none;">
|
||||
<div class="ant-tooltip-content">
|
||||
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
|
||||
<div class="ant-tooltip-inner" role="tooltip">30</div>
|
||||
|
@ -42,7 +42,7 @@ exports[`Slider should show tooltip when hovering slider handler 2`] = `
|
|||
<div style="position: absolute; top: 0px; left: 0px; width: 100%;">
|
||||
<div>
|
||||
<!---->
|
||||
<div class="ant-tooltip ant-slider-tooltip ant-tooltip-placement-top" style="display: none;">
|
||||
<div class="ant-tooltip ant-slider-tooltip" style="pointer-events: none; display: none;">
|
||||
<div class="ant-tooltip-content">
|
||||
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
|
||||
<div class="ant-tooltip-inner" role="tooltip">30</div>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`TimePicker not render clean icon when allowClear is false 1`] = `
|
||||
<!----><span class="ant-time-picker"><input class="ant-time-picker-input ant-input" type="text" placeholder="Select time" readonly=""><span class="ant-time-picker-icon"><span role="img" aria-label="clock-circle" class="anticon anticon-clock-circle ant-time-picker-clock-icon"><svg focusable="false" class="" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></span></span>
|
||||
<!----></span>
|
||||
<!---->
|
||||
<div class="ant-picker">
|
||||
<div class="ant-picker-input"><input readonly="" placeholder="Select time" title="00:00:00" size="10" autocomplete="off"><span class="ant-picker-suffix"><span role="img" aria-label="clock-circle" class="anticon anticon-clock-circle"><svg focusable="false" class="" data-icon="clock-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"></path></svg></span></span>
|
||||
<!---->
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`TimePicker renders addon correctly 1`] = `<div class="ant-time-picker-panel-addon"><button type="button">Ok</button></div>`;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import TimePicker from '..';
|
||||
import moment from 'moment';
|
||||
import dayjs from 'dayjs';
|
||||
import focusTest from '../../../tests/shared/focusTest';
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
import { sleep } from '../../../tests/utils';
|
||||
|
@ -25,29 +25,31 @@ describe('TimePicker', () => {
|
|||
mount(
|
||||
{
|
||||
render() {
|
||||
return <TimePicker open addon={() => <button type="button">Ok</button>} />;
|
||||
return (
|
||||
<TimePicker
|
||||
open={true}
|
||||
addon={() => (
|
||||
<button class="my-btn" type="button">
|
||||
Ok
|
||||
</button>
|
||||
)}
|
||||
/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{ sync: false, attachTo: 'body' },
|
||||
);
|
||||
await sleep();
|
||||
expect(document.body.querySelector('.ant-time-picker-panel-addon').outerHTML).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('allowEmpty deprecated', () => {
|
||||
mount({
|
||||
render() {
|
||||
return <TimePicker allowEmpty />;
|
||||
},
|
||||
});
|
||||
expect(errorSpy).toBeCalledWith(
|
||||
'Warning: [antdv: TimePicker] `allowEmpty` is deprecated. Please use `allowClear` instead.',
|
||||
expect(document.getElementsByClassName('my-btn').length).toBeTruthy();
|
||||
expect(errorSpy).toHaveBeenCalledWith(
|
||||
'Warning: [ant-design-vue: TimePicker] `addon` is deprecated. Please use `v-slot:renderExtraFooter` instead.',
|
||||
);
|
||||
});
|
||||
|
||||
it('not render clean icon when allowClear is false', () => {
|
||||
const wrapper = mount({
|
||||
render() {
|
||||
return <TimePicker defaultValue={moment('2000-01-01 00:00:00')} allowClear={false} />;
|
||||
return <TimePicker defaultValue={dayjs('2000-01-01 00:00:00')} allowClear={false} />;
|
||||
},
|
||||
});
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineComponent, ref } from 'vue';
|
||||
import type { PickerTimeProps, RangePickerTimeProps } from '../date-picker/generatePicker';
|
||||
import type { RangePickerTimeProps } from '../date-picker/generatePicker';
|
||||
import generatePicker from '../date-picker/generatePicker';
|
||||
import {
|
||||
commonProps,
|
||||
|
@ -40,25 +40,26 @@ function createTimePicker<DateType>(generateConfig: GenerateConfig<DateType>) {
|
|||
popupClassName?: string;
|
||||
valueFormat?: string;
|
||||
};
|
||||
type TimePickerProps = Omit<PickerTimeProps<DateType>, 'picker'> & {
|
||||
popupClassName?: string;
|
||||
valueFormat?: string;
|
||||
};
|
||||
const TimePicker = defineComponent<TimePickerProps>({
|
||||
// type TimePickerProps = Omit<PickerTimeProps<DateType>, 'picker'> & {
|
||||
// popupClassName?: string;
|
||||
// valueFormat?: string;
|
||||
// };
|
||||
const TimePicker = defineComponent({
|
||||
name: 'ATimePicker',
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
...commonProps<DateType>(),
|
||||
...datePickerProps<DateType>(),
|
||||
...timpePickerProps,
|
||||
addon: { type: Function },
|
||||
} as any,
|
||||
slot: ['addon', 'renderExtraFooter', 'suffixIcon', 'clearIcon'],
|
||||
emits: ['change', 'openChange', 'focus', 'blur', 'ok', 'update:value', 'update:open'],
|
||||
setup(props, { slots, expose, emit, attrs }) {
|
||||
devWarning(
|
||||
!slots.addon,
|
||||
!(slots.addon || props.addon),
|
||||
'TimePicker',
|
||||
'`addon` is deprecated. Please use `renderExtraFooter` instead.',
|
||||
'`addon` is deprecated. Please use `v-slot:renderExtraFooter` instead.',
|
||||
);
|
||||
const pickerRef = ref();
|
||||
expose({
|
||||
|
@ -94,7 +95,9 @@ function createTimePicker<DateType>(generateConfig: GenerateConfig<DateType>) {
|
|||
dropdownClassName={props.popupClassName}
|
||||
mode={undefined}
|
||||
ref={pickerRef}
|
||||
renderExtraFooter={slots.addon ?? props.renderExtraFooter ?? slots.renderExtraFooter}
|
||||
renderExtraFooter={
|
||||
props.addon || slots.addon || props.renderExtraFooter || slots.renderExtraFooter
|
||||
}
|
||||
onChange={onChange}
|
||||
onOpenChange={onOpenChange}
|
||||
onFocus={onFoucs}
|
||||
|
|
|
@ -36,9 +36,10 @@ Array [
|
|||
"Comment",
|
||||
"ConfigProvider",
|
||||
"DatePicker",
|
||||
"RangePicker",
|
||||
"MonthPicker",
|
||||
"WeekPicker",
|
||||
"RangePicker",
|
||||
"QuarterPicker",
|
||||
"Descriptions",
|
||||
"DescriptionsItem",
|
||||
"Divider",
|
||||
|
@ -117,6 +118,7 @@ Array [
|
|||
"Tag",
|
||||
"CheckableTag",
|
||||
"TimePicker",
|
||||
"TimeRangePicker",
|
||||
"Timeline",
|
||||
"TimelineItem",
|
||||
"Tooltip",
|
||||
|
|
|
@ -1,16 +1,52 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import { asyncExpect } from '../utils';
|
||||
import { sleep } from '../utils';
|
||||
|
||||
export default function focusTest(Component) {
|
||||
describe('focus and blur', () => {
|
||||
let focused = false;
|
||||
let blurred = false;
|
||||
const mockFocus = jest.spyOn(HTMLElement.prototype, 'focus');
|
||||
const mockBlur = jest.spyOn(HTMLElement.prototype, 'blur');
|
||||
|
||||
beforeAll(() => {
|
||||
jest.useFakeTimers();
|
||||
mockFocus.mockImplementation(() => {
|
||||
focused = true;
|
||||
});
|
||||
mockBlur.mockImplementation(() => {
|
||||
blurred = true;
|
||||
});
|
||||
});
|
||||
|
||||
let container;
|
||||
beforeEach(() => {
|
||||
container = document.createElement('div');
|
||||
document.body.appendChild(container);
|
||||
focused = false;
|
||||
blurred = false;
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
jest.useRealTimers();
|
||||
mockFocus.mockRestore();
|
||||
mockBlur.mockRestore();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
document.body.removeChild(container);
|
||||
});
|
||||
|
||||
const getElement = wrapper => {
|
||||
let ele = wrapper.findAll('input');
|
||||
if (ele.length === 0) {
|
||||
ele = wrapper.findAll('button');
|
||||
}
|
||||
if (ele.length === 0) {
|
||||
ele = wrapper.findAll('textarea');
|
||||
}
|
||||
if (ele.length === 0) {
|
||||
ele = wrapper.findAll('div[tabindex]');
|
||||
}
|
||||
return ele[0];
|
||||
};
|
||||
it('focus() and onFocus', async () => {
|
||||
const handleFocus = jest.fn();
|
||||
const wrapper = mount(
|
||||
|
@ -19,46 +55,45 @@ export default function focusTest(Component) {
|
|||
return <Component ref="component" onFocus={handleFocus} />;
|
||||
},
|
||||
},
|
||||
{ attachTo: 'body', sync: false },
|
||||
{ attachTo: container, sync: false },
|
||||
);
|
||||
wrapper.vm.$refs.component.focus();
|
||||
jest.runAllTimers();
|
||||
expect(focused).toBeTruthy();
|
||||
getElement(wrapper).trigger('focus');
|
||||
expect(handleFocus).toBeCalled();
|
||||
});
|
||||
|
||||
it('blur() and onBlur', async () => {
|
||||
const handleBlur = jest.fn();
|
||||
const handleFocus = jest.fn();
|
||||
const wrapper = mount(
|
||||
{
|
||||
render() {
|
||||
return <Component ref="component" onBlur={handleBlur} />;
|
||||
return <Component ref="component" onFocus={handleFocus} onBlur={handleBlur} />;
|
||||
},
|
||||
},
|
||||
{ attachTo: 'body', sync: false },
|
||||
{ attachTo: container, sync: false },
|
||||
);
|
||||
wrapper.vm.$refs.component.focus();
|
||||
getElement(wrapper).trigger('focus');
|
||||
wrapper.vm.$refs.component.blur();
|
||||
jest.runAllTimers();
|
||||
await asyncExpect(() => {
|
||||
expect(handleBlur).toBeCalled();
|
||||
});
|
||||
expect(blurred).toBeTruthy();
|
||||
getElement(wrapper).trigger('blur');
|
||||
await sleep(300);
|
||||
expect(handleBlur).toBeCalled();
|
||||
});
|
||||
|
||||
it('autofocus', done => {
|
||||
jest.useRealTimers();
|
||||
it('autofocus', async () => {
|
||||
const handleFocus = jest.fn();
|
||||
mount(
|
||||
const wrapper = mount(
|
||||
{
|
||||
render() {
|
||||
return <Component autofocus={true} onFocus={handleFocus} />;
|
||||
},
|
||||
},
|
||||
{ attachTo: 'body', sync: false },
|
||||
{ attachTo: container, sync: false },
|
||||
);
|
||||
setTimeout(() => {
|
||||
expect(handleFocus).toBeCalled();
|
||||
done();
|
||||
}, 1000);
|
||||
getElement(wrapper).trigger('focus');
|
||||
expect(handleFocus).toBeCalled();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
2
v2-doc
2
v2-doc
|
@ -1 +1 @@
|
|||
Subproject commit e7db31900631a7da14f40b7f2ab0e3f266a26e00
|
||||
Subproject commit 157cce105e1f0a369658dfb29cc802ebc09d0d93
|
Loading…
Reference in New Issue