@entur/datepicker 11.1.1-beta.0 → 11.1.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -370,12 +370,14 @@ var CalendarCell = function CalendarCell(_ref) {
370
370
  }, rest, {
371
371
  onClick: function onClick(e) {
372
372
  buttonProps.onClick && buttonProps.onClick(e);
373
+ // Used to force close calendar on select
373
374
  isSelected && onSelectedCellClick();
374
375
  cellCanBeSelected && onCellClick();
375
376
  },
376
- onKeyDown: function onKeyDown(e) {
377
- buttonProps.onKeyDown && buttonProps.onKeyDown(e);
378
- if (e.key === 'Enter' || e.key === ' ') {
377
+ onKeyUp: function onKeyUp(e) {
378
+ buttonProps.onKeyUp && buttonProps.onKeyUp(e);
379
+ if (e.key === 'Enter') {
380
+ // Used to force close calendar on select
379
381
  isSelected && onSelectedCellClick();
380
382
  cellCanBeSelected && onCellClick();
381
383
  }