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.

Allow setting of highlight focus day

See original GitHub issue

Related to #2000, but that was closed without any resolution.

Bug description:

When the datepicker popup is launched, the first day of the month is highlighted, whereas convention seems to indicate that the current day should be highlighted

Expected behavior:

The .btn-light class should be applied to the current date by default, or there should be options added to the API such as [highlightDay]="first|current".

Link to minimally-working plunker that reproduces the issue:

https://ng-bootstrap.github.io/app/components/datepicker/demos/popup/plnkr.html

Version of Angular, ng-bootstrap, and Bootstrap:

ng-bootstrap: v. 1.0.0.-beta-9

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jdhinescommented, Jan 30, 2018

Yes, the keyboard navigation focus. If no date has been picked and the popup is opened, the only thing highlighted is the first day of the month. I was just mentioning that in any other datepicker I’ve seen, if anything is highlighted, it’s the current day, so that if that’s what the user wants, it’s easy to pick. See the datepickers from jQuery, Angular Material, and Angular datepicker

And if a day has been selected, it seems weird to me when the picker opens, both the selected day and the first day of the month are highlighted (albeit with different colors, but one shade of blue doesn’t automatically mean something different than another shade of blue). I’ve seen datepickers where today’s date is always highlighted, but none others where the first of the month is.

Maybe it’s just me, but I would prefer there to be no highlight whatsoever if the current value is null, at least until the user hits an arrow key, unless the highlight is the current day.

So maybe if there could be a new option for “keyboardFocusHighlight”?

1reaction
maxokorokovcommented, Feb 26, 2018

I would very much prefer this for focus/keyboard handling: #1716. I think it would solve this issue too, because navigation arrows would have a separate focus for instance.

I also agree that when you open a month initially the focus should not be on the first day, but:

  • selected date visible → focus on selected date
  • today visible → focus on today
  • nothing of the above → maybe focus the first date, maybe focus/highlight nothing until any of the navigation keys are pressed. Not sure, will think about it, needs testing.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Highlight part of page you're focused on - Google Chrome Help
At the top right, click More More and then Settings. Click Advanced and then Accessibility. Turn on "Show a quick highlight on the...
Read more >
CSS highlight on focus - Stack Overflow
I am using border radius on an input field and when I select the field, it gets a border highlight as ...
Read more >
Create Focus Time in Office 365 Calendar
Blocking time allows you to focus on what needs to get done before being filled with meetings. On Office 365 Calendar, there is...
Read more >
Need to Focus? Change These Notifications Settings in Office ...
You can set automatic rules that enable Focus Assist during specified hours of the day or for different scenarios, like duplicating your display ......
Read more >
iOS 16 - New Features - Apple
You can switch your Lock Screen throughout the day. ... When you're setting up a Focus, select apps and people you want to...
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