-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #350 from Hacker0x01/today
Today Button
- Loading branch information
Showing
8 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from "react"; | ||
import DatePicker from "react-datepicker"; | ||
import moment from "moment"; | ||
|
||
export default React.createClass({ | ||
displayName: "Default", | ||
|
||
getInitialState() { | ||
return { | ||
startDate: moment() | ||
}; | ||
}, | ||
|
||
handleChange(date) { | ||
this.setState({ | ||
startDate: date | ||
}); | ||
}, | ||
|
||
render() { | ||
return <div className="row"> | ||
<pre className="column example__code"> | ||
<code className="jsx"> | ||
{"<DatePicker"}<br /> | ||
{"showTodayButton={'Vandaag'}"}<br /> | ||
{"selected={this.state.startDate}"}<br /> | ||
{"onChange={this.handleChange} />"} | ||
</code> | ||
</pre> | ||
<div className="column"> | ||
<DatePicker | ||
todayButton={"Vandaag"} | ||
selected={this.state.startDate} | ||
onChange={this.handleChange} /> | ||
</div> | ||
</div>; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,11 @@ defaultValue: `[ | |
]` | ||
|
||
|
||
### `todayButton` | ||
|
||
type: `string` | ||
|
||
|
||
### `weekStart` | ||
|
||
type: `string` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters