mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-22 10:40:36 +03:00
feat: add prop partial-update
Determine whether update date when select year of month. The default value is false.
This commit is contained in:
@@ -63,4 +63,17 @@ describe('CalendarRange', () => {
|
||||
await flushPromises();
|
||||
expect(wrapper.vm.calendars).toEqual([new Date(2019, 6, 1), new Date(2019, 7, 1)]);
|
||||
});
|
||||
|
||||
it('partialUpdate should be false', () => {
|
||||
wrapper = mount(CalendarRange, {
|
||||
propsData: {
|
||||
partialUpdate: true,
|
||||
},
|
||||
});
|
||||
const panels = wrapper.findAll(CalendarPanel);
|
||||
const startPanel = panels.at(0);
|
||||
const endPanel = panels.at(1);
|
||||
expect(startPanel.vm.partialUpdate).toBe(false);
|
||||
expect(endPanel.vm.partialUpdate).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user