Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions src/date-picker/calendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let Calendar = React.createClass({
shouldShowMonthDayPickerFirst: React.PropTypes.bool,
shouldShowYearPickerFirst: React.PropTypes.bool,
showYearSelector: React.PropTypes.bool,
onSelectedDate: React.PropTypes.func,
onDayTouchTap: React.PropTypes.func,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

},

windowListeners: {
Expand Down Expand Up @@ -230,7 +230,7 @@ let Calendar = React.createClass({
}
},

_setSelectedDate(date, e) {
_setSelectedDate(date) {
let adjustedDate = date;
if (DateTime.isBeforeDate(date, this.props.minDate)) {
adjustedDate = this.props.minDate;
Expand All @@ -248,11 +248,11 @@ let Calendar = React.createClass({
selectedDate: adjustedDate,
});
}
if (this.props.onSelectedDate) this.props.onSelectedDate(e, date);
},

_handleDayTouchTap(e, date) {
this._setSelectedDate(date, e);
this._setSelectedDate(date);
if (this.props.onDayTouchTap) this.props.onDayTouchTap(e, date);
},

_handleMonthChange(months) {
Expand Down
4 changes: 2 additions & 2 deletions src/date-picker/date-picker-dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ let DatePickerDialog = React.createClass({
repositionOnUpdate={false}>
<Calendar
ref="calendar"
onSelectedDate={this._onSelectedDate}
onDayTouchTap={this._onDayTouchTap}
initialDate={this.props.initialDate}
isActive={this.state.isCalendarActive}
minDate={this.props.minDate}
Expand All @@ -123,7 +123,7 @@ let DatePickerDialog = React.createClass({
this.refs.dialog.dismiss();
},

_onSelectedDate() {
_onDayTouchTap() {
if (this.props.autoOk) {
setTimeout(this._handleOKTouchTap, 300);
}
Expand Down