Skip to content

Commit

Permalink
Patch: Placeholder in <DatePicker>
Browse files Browse the repository at this point in the history
  • Loading branch information
soyjavi committed Nov 17, 2015
1 parent 94c8747 commit 98f2920
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion components/date_picker/index.jsx
Expand Up @@ -10,9 +10,14 @@ class DatePicker extends React.Component {
maxDate: React.PropTypes.object,
minDate: React.PropTypes.object,
onChange: React.PropTypes.func,
placeholder: React.PropTypes.string,
value: React.PropTypes.object
};

static defaultProps = {
placeholder: 'Choose a date'
};

state = {
active: false
};
Expand Down Expand Up @@ -40,7 +45,7 @@ class DatePicker extends React.Component {
<Input
className={style.input}
onMouseDown={this.handleInputMouseDown}
placeholder='Pick up date'
placeholder={this.props.placeholder}
readOnly={true}
type='text'
value={date}
Expand Down
1 change: 1 addition & 0 deletions components/date_picker/readme.md
Expand Up @@ -40,4 +40,5 @@ class DatePickerTest extends React.Component {
| `maxDate` | `Date` | | Date object with the maximum selectable date. |
| `minDate` | `Date` | | Date object with the minimum selectable date. |
| `onChange` | `Function` | | Callback called when the picker value is changed.|
| `placeholder` | `String` | | The text string to use like a input placeholder.|
| `value` | `Date` | | Date object with the currently selected date. |
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-toolbox",
"version": "0.12.5",
"version": "0.12.6",
"homepage": "www.react-toolbox.com",
"description": "A set of React components implementing Google's Material Design specification with the power of CSS Modules.",
"author": "React Toolbox Team (http://github.com/react-toolbox)",
Expand Down

0 comments on commit 98f2920

Please sign in to comment.