Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions components/datepicker/datepickerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ describe('Datepicker Plugin', () => {
setTimeout(() => {
expect(input.value)
.withContext('value should change with confirm interaction')
.toEqual(`${month < 10 ? `0${month}` : month}/0${day}/${year}`);
.toEqual(`${month < 10 ? `0${month}` : month}/${day < 10 ? '0' + day : day}/${year}`);
dayEl = document.querySelector('.datepicker-container button[data-day="1"]');
dayEl.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
cancelBtn.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
setTimeout(() => {
expect(input.value)
.withContext('value should not change with cancel interaction')
.toEqual(`${month < 10 ? `0${month}` : month}/0${day}/${year}`);
.toEqual(`${month < 10 ? `0${month}` : month}/${day < 10 ? '0' + day : day}/${year}`);
clearBtn.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
setTimeout(() => {
expect(input.value.length)
Expand All @@ -156,7 +156,7 @@ describe('Datepicker Plugin', () => {
}, 10);
}, 10);
}, 10);
});
}, 10);
});
});
});
2 changes: 1 addition & 1 deletion src/dockedDisplayPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class DockedDisplayPlugin {
) {
this.hide();
}
});
}, true);
}

/**
Expand Down