This is request for change.
When:
- user selects a value in datepicker
- user dismisses datepicker clicking outside or using ESC key
previously select element should be probably reselected, as it’s done for modal with element to focus:
https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/modal/modal-window.ts#L68
This would allow users to quickly reselect value in the case of e.g. minor error that could be quickly corrected
.
Other reference implementation supporting this behaviour:
https://material.angular.io/components/datepicker/overview
https://clarity.design/documentation/datepicker#examples
This would be non breaking change (unless some tests rely on keyboard navigation with presumed current focus behaviour).
Thanks!
NgBootstrap: 5.1
Hi. This change breaks the usage of opening the datepicker via
<input (focus)="Datepicker.open()"/>
When the datepicker is dismissed by clicking somewhere else, the input gets focussed again and reopens the datepicker, therefore it will never close again.
@maxokorokov unless there is another way of opening the datepicker on focus, this seems to be a bug for me