Skip to content

Commit a6a6ad6

Browse files
committed
Edit example and README to mention new formats
1 parent a1a9429 commit a6a6ad6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ DatePicker component. Renders as a [React-Bootstrap InputGroup](https://react-bo
126126
* **Callback Arguments:**
127127
* `event` - Blur event.
128128
* **Type:** `Event`
129-
* `dateFormat` - Date format. Any combination of DD, MM, YYYY and separator.
129+
* `dateFormat` - Date format. One of DD-MM-YYYY, MM-DD-YYYY or YYYY-MM-DD where - can be any separator. Alternatively DD and MM can be replaced with D and M for no zero prepending.
130130
* **Optional**
131131
* **Type:** `string`
132-
* **Examples:** `"MM/DD/YYYY"`, `"YYYY/MM/DD"`, `"MM-DD-YYYY"`, or `"DD MM YYYY"`
132+
* **Examples:** `"MM/DD/YYYY"`, `"YYYY/M/D"`, `"MM-DD-YYYY"`, or `"DD MM YYYY"`
133133
* `clearButtonElement` - Character or component to use for the clear button.
134134
* **Optional**
135135
* **Type:** `string` or `ReactClass`

example/app.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ const App = React.createClass({
147147
</Col>
148148
<Col sm={4}>
149149
<FormGroup>
150-
<ControlLabel>YYYY/MM/DD</ControlLabel>
151-
<DatePicker dateFormat="YYYY/MM/DD" onChange={this.handleChange} value={this.state.date} />
150+
<ControlLabel>YYYY/M/D</ControlLabel>
151+
<DatePicker dateFormat="YYYY/M/D" onChange={this.handleChange} value={this.state.date} />
152152
<HelpBlock>Help</HelpBlock>
153153
</FormGroup>
154154
</Col>

0 commit comments

Comments
 (0)