Skip to content

Commit

Permalink
Merge pull request mui#4250 from ToxicSalt/datepicker-classname
Browse files Browse the repository at this point in the history
[DatePicker] Added className prop to DatePicker
  • Loading branch information
nathanmarks committed May 14, 2016
2 parents 9b44beb + 229102a commit e34d7cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class DatePicker extends Component {
* Override the default text of the 'Cancel' button.
*/
cancelLabel: PropTypes.node,
/**
* The css class name of the root element.
*/
className: PropTypes.string,
/**
* Used to control how the Date Picker will be displayed when the input field is focused.
* `dialog` (default) displays the DatePicker as a dialog with a modal.
Expand Down Expand Up @@ -251,6 +255,7 @@ class DatePicker extends Component {
DateTimeFormat,
autoOk,
cancelLabel,
className,
container,
defaultDate, // eslint-disable-line no-unused-vars
disableYearSelection,
Expand All @@ -275,7 +280,7 @@ class DatePicker extends Component {
const formatDate = this.props.formatDate || this.formatDate;

return (
<div style={prepareStyles(Object.assign({}, style))}>
<div className={className} style={prepareStyles(Object.assign({}, style))}>
<TextField
{...other}
onFocus={this.handleFocus}
Expand Down

0 comments on commit e34d7cc

Please sign in to comment.