Skip to content

Commit

Permalink
fix(datepicker): close picker when select date
Browse files Browse the repository at this point in the history
  • Loading branch information
aesteves60 committed Oct 31, 2023
1 parent be32b69 commit 6c06d99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class OdsDatepickerController {
this.component.datepickerInstanceAccessor?.setDate(newValue);
this.component.emitDatepickerValueChange(newValue, oldValue ? oldValue : null);
}
this.component.el.focus();
this.component.el.blur();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ describe('spec:osds-datepicker', () => {
instance.handleInputValueChange(event);
await page.waitForChanges();
expect(controller.onChange).toHaveBeenCalledTimes(1);
expect(instance.hasFocus).toBe(false);
});

it('should call onChange with null when value is empty', async() => {
Expand Down

0 comments on commit 6c06d99

Please sign in to comment.