question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Focus on datepicker footer triggers extra selects

See original GitHub issue

Bug description:

When using a datepicker with a custom footer, if that footer contains focusable elements (e.g. inputs), navigating between those elements with keyboard tab causes select events which are invalid. The selection payload is not an NgbDate instance, but a JS Event with type: 'select'.

Link to minimally-working StackBlitz that reproduces the issue:

https://stackblitz.com/edit/ng-bootstrap-footer-focus

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 8.2.12

ng-bootstrap: 5.1.2

Bootstrap: 4.3.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
maxokorokovcommented, Jan 9, 2020

Not yet fully fixed actually, will keep it open for 6.0. Since 5.2.0 there is a new (dateSelect) output to avoid collisions

1reaction
maxokorokovcommented, Nov 7, 2019

Hey, @Nosfistis. Thanks for reporting this.

  • Datepicker was created before the InputDatepicker
  • Datepicker could never raise select event, so the output was named (select)
  • InputDatepicker was added on the <input> element, so we had to name similar output (dateSelect)
  • then we added a footer to the Datepicker and got this issue 😃

Anyway I suggest we:

  1. introduce (dateSelect) to the datepicker
  2. deprecate (select)
  3. remove (select) in the next major release
Read more comments on GitHub >

github_iconTop Results From Across the Web

Antd DatePicker: Input in extra footer can't change, select or ...
My problem is here. I can't change, select, focus any input render in extra footer. I want my input time can use (select,...
Read more >
DatePicker - Ant Design
We can set the date format by format . This property provide an additional time selection. When showTime is an Object, its properties...
Read more >
DatePicker - Ant Design - A UI Design Language
When To Use#. By clicking the input box, you can select a date from a popup calendar. ... Render extra footer in panel...
Read more >
Datepickers - Lightning Design System
When the datepicker opens, place user focus on either the currently selected date in the grid or if no date is selected the...
Read more >
DatePicker - Ant Design
To select or input a date. ... DatePicker. To select or input a date. ... Render extra footer in panel for customized requirements....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found