Skip to content

Commit

Permalink
fix: Lint Calendar component (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
willb335 authored and prehnRA committed Apr 18, 2018
1 parent c0dce6e commit 26ba197
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/DatePicker/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class Calendar extends Component {
/**
* Creates a Calendar. Sets state.date to a Luxon DateTime based on the
* selectedDate prop.
* @param {*} props
* @param {*} props - the props
*/
constructor(props) {
super(props)
Expand All @@ -62,7 +62,8 @@ export default class Calendar extends Component {
* `selectedDate` prop from up the hierarchy, set state.date to a new Luxon
* DateTime appropriately (in order to force the calendar to focus on the new
* date).
* @param {*} nextProps
* @param {*} nextProps - the next props
* @return {void}
*/
componentWillReceiveProps(nextProps) {
if (nextProps.selectedDate !== this.props.selectedDate) {
Expand All @@ -75,6 +76,7 @@ export default class Calendar extends Component {
* or invalid (e.g. 2018-06-66), return the local current date instead.
* @param {string} date - the date to convert, as either an iso date, or a
* blank / null
* @return {DateTime} - a local DateTime
*/
asLuxon(date) {
if (!date) {
Expand Down Expand Up @@ -123,9 +125,10 @@ export default class Calendar extends Component {
*
* This function does not change the date in the input (only calendar display,
* so we can get away with using the first of the month like this.
* @param {int} n
* @param {int} num - the number of months to move the focus month
* @param {Event} event - the event that caused this handler to be invoked
* (e.g. the click event from the next or previous button on the calendar)
* @return {void}
*/
addMonth(num, event) {
event.preventDefault()
Expand Down

0 comments on commit 26ba197

Please sign in to comment.