Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Moves DatePicker label outside of hit target",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "joem@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { FirstWeekOfYear } from '../../utilities/dateValues/DateValues';
import { Callout } from '../../Callout';
import { DirectionalHint } from '../../common/DirectionalHint';
import { TextField } from '../../TextField';
import { Label } from '../../Label';
import {
autobind,
BaseComponent,
Expand Down Expand Up @@ -189,6 +190,9 @@ export class DatePicker extends BaseComponent<IDatePickerProps, IDatePickerState

return (
<div className={ css('ms-DatePicker', styles.root, className) } ref={ this._resolveRef('_root') }>
{ label && (
<Label required={ isRequired }>{ label }</Label>
) }
<div ref={ this._resolveRef('_datepicker') }>
<TextField
className={ styles.textField }
Expand All @@ -203,7 +207,6 @@ export class DatePicker extends BaseComponent<IDatePickerProps, IDatePickerState
onClick={ this._onTextFieldClick }
onChanged={ this._onTextFieldChanged }
errorMessage={ errorMessage }
label={ label }
placeholder={ placeholder }
borderless={ borderless }
iconProps={ {
Expand Down