From 5aebbc019eb4d00bb40107a852133cba54ff2c30 Mon Sep 17 00:00:00 2001 From: Michael Jewell Date: Thu, 20 Jul 2017 13:57:00 -0700 Subject: [PATCH] mj - dont tab to button on date input --- src/components/DateInput.js | 8 +++++++- test/components/DateInput.spec.js | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/DateInput.js b/src/components/DateInput.js index 3ae21de92..bbf2c42de 100644 --- a/src/components/DateInput.js +++ b/src/components/DateInput.js @@ -200,7 +200,13 @@ export default class DateInput extends Component { disabled={disabled} /> - diff --git a/test/components/DateInput.spec.js b/test/components/DateInput.spec.js index 0c7ce4d89..609487705 100644 --- a/test/components/DateInput.spec.js +++ b/test/components/DateInput.spec.js @@ -43,6 +43,14 @@ describe('', () => { }); }); + it('should not tab to the calendar button', () => { + const component = mount(); + + const toggle = component.find('InputGroupButton'); + const calendarButton = toggle.find('Button'); + assert.equal(calendarButton.props().tabIndex, -1); + }); + it('should should open and close when input addon clicked', () => { const component = mount(); const dropdown = component.find('Dropdown');