Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DatePicker] add function signatures to docs #3652

Merged
merged 1 commit into from
Mar 10, 2016
Merged
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
29 changes: 19 additions & 10 deletions src/date-picker/date-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ const DatePicker = React.createClass({
* This function is called to format the date displayed in the input box, and should return a string.
* By default if no `locale` and `DateTimeFormat` is provided date objects are formatted to ISO 8601 YYYY-MM-DD.
*
* @param {object} date `Date` object to be formatted.
* @param {object} date Date object to be formatted.
* @returns {any} The formatted date.
*/
formatDate: React.PropTypes.func,

Expand Down Expand Up @@ -96,35 +97,43 @@ const DatePicker = React.createClass({
okLabel: React.PropTypes.string,

/**
* Callback function that is fired when the date value changes. Since there
* is no particular event associated with the change the first argument
* will always be null and the second argument will be the new Date instance.
* Callback function that is fired when the date value changes.
*
* @param {null} null Since there is no particular event associated with the change,
* the first argument will always be null.
* @param {object} date The new date.
*/
onChange: React.PropTypes.func,

/**
* Fired when the Date Picker dialog is dismissed.
* Callback function that is fired when the Date Picker's dialog is dismissed.
*/
onDismiss: React.PropTypes.func,

/**
* Fired when the Date Picker field gains focus.
* Callback function that is fired when the Date Picker's `TextField` gains focus.
*
* @param {object} event `focus` event targeting the `TextField`.
*/
onFocus: React.PropTypes.func,

/**
* Fired when the Date Picker dialog is shown.
* Callback function that is fired when the Date Picker's dialog is shown.
*/
onShow: React.PropTypes.func,

/**
* Called when touch tap event occurs on text-field.
* Callback function that is fired when a touch tap event occurs on the Date Picker's `TextField`.
*
* @param {object} event TouchTap event targeting the `TextField`.
*/
onTouchTap: React.PropTypes.func,

/**
* Called during render time of a given day. If this method returns
* false the day is disabled, otherwise it is displayed normally.
* Callback function used to determine if a day's entry should be disabled on the calendar.
*
* @param {object} day Date object of a day.
* @returns {boolean} Indicates whether the day should be disabled.
*/
shouldDisableDate: React.PropTypes.func,

Expand Down