-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(timepicker) - add keyboard navigation #1007
Comments
Setting [arrowkeys]="false" doesn't seem to change any behavior for me either. Are you sure you don't have [showSpinners]="false"? That removes the up down arrow chevrons. |
Im sure On Mon, Oct 3, 2016, 23:43 Zachary Billington notifications@github.com
|
Pressing the arrow keys on my Macbook Air (macOS Sierra) in the latest Chrome does not change the value in the timepicker, even if I explicitly state |
It may be that pressing up by default puts the cursor at the beginning of the input and down puts it at the end. Perhaps you need to |
'arrowkeys' property is not working for me either. Is it fixed yet? or is there something I may be missing? |
It's still not working. I ended up putting a hacky jQuery script in a plain JS file that I link to in my header. $(function() {
$(document).on('keydown', 'timepicker input[type=text], timepicker button', function(e) {
if (e.keyCode === 38 || e.keyCode === 40) {
e.preventDefault();
e.stopPropagation();
let $this = $(e.currentTarget);
let index = $this.closest('td').index();
if ($this.is(':not(button)')) {
if (e.keyCode === 38) {
$this.closest('table').find('tr').first().find('td:nth-child(' + (index + 1) + ') a > *').first().click();
}
else {
$this.closest('table').find('tr').last().find('td:nth-child(' + (index + 1) + ') a > *').first().click();
}
}
else {
$this.click();
}
}
});
}); This works even with the buttons hidden. |
fixes #2036 fixes #1981 ( + min max demo ) fixes #1973 close #1957 ( + seconds demo ) fixes #1935 fixes #1672 feat #1007 added keyboard and mousewheel support fixes #962 fixes #793 fixes #173 fixes #1271 added custom validation demo fixes #1539 bs4 fixes #1253 if input is invalid * feat(timepicker): new timepicker implementation * feat(timepicker): new timepicker implementation testing * chore(timepicker): removed old timepicker implementation * chore(mini-ngrx): added ngrx licence * fix(timepicker): fix seconds * fix(timepicker): fix custom validation demo * fix(tests): fix tests & aot errors * fix(timepicker): min max restrictions * fix(timepicker): min max checks * feat(timepicker): add inputs validation (#2187) * feat(timepicker): add inputs validation * fix(timepicker): add isPM support * feat(timepicker): add isValid output * feat(timepicker): added test plan (#2127) * fix(timepicker): fix ngModelChange demo * fix(test): fix unit tests * docs(timepicker): fix docs conflict, add isValid description
fixed in #2058 |
bug
timer - arrowKeys not working.
and i dont see the arrows (up and down) for each input of hour:minutes
The text was updated successfully, but these errors were encountered: