diff --git a/common/changes/office-ui-fabric-react/kisiebel-date-picker-focus-bug_2018-07-16-17-54.json b/common/changes/office-ui-fabric-react/kisiebel-date-picker-focus-bug_2018-07-16-17-54.json new file mode 100644 index 00000000000000..805b53c0df20b8 --- /dev/null +++ b/common/changes/office-ui-fabric-react/kisiebel-date-picker-focus-bug_2018-07-16-17-54.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "DatePicker: Fixes a bug where the DatePicker would only open every other time it gained focus.", + "type": "patch" + } + ], + "packageName": "office-ui-fabric-react", + "email": "kisiebel@microsoft.com" +} diff --git a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.base.tsx b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.base.tsx index 167958ca1d849a..ef1efa2103b98c 100644 --- a/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.base.tsx +++ b/packages/office-ui-fabric-react/src/components/DatePicker/DatePicker.base.tsx @@ -90,13 +90,10 @@ export class DatePickerBase extends BaseComponent(); private _datePickerDiv = createRef(); private _textField = createRef(); - private _preventFocusOpeningPicker: boolean; constructor(props: IDatePickerProps) { super(props); this.state = this._getDefaultState(); - - this._preventFocusOpeningPicker = false; } public componentWillReceiveProps(nextProps: IDatePickerProps): void { @@ -287,11 +284,7 @@ export class DatePickerBase extends BaseComponent { - this._preventFocusOpeningPicker = true; this._dismissDatePickerPopup(); // don't need to focus the text box, if necessary the focusTrapZone will do it };