mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-20 06:30:35 +03:00
feat: add prop defaultPanel (#394)
This commit is contained in:
@@ -187,4 +187,15 @@ describe('CalendarPanel', () => {
|
||||
.trigger('click');
|
||||
expect(wrapper.emitted().select[1][0]).toEqual(new Date(2010, 0, 4));
|
||||
});
|
||||
|
||||
it('prop: defaultPanel', () => {
|
||||
wrapper = mount(CalendarPanel, {
|
||||
propsData: {
|
||||
open: true,
|
||||
type: 'month',
|
||||
defaultPanel: 'year',
|
||||
},
|
||||
});
|
||||
expect(wrapper.vm.panel).toBe('year');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user