lib/src/DayPickerInput.js
function defaultFormat(d) {
  if ((0, _DateUtils.isDate)(d)) {
    var year = d.getFullYear();
    var month = '' + (d.getMonth() + 1);
    var day = '' + d.getDate();
    return year + '-' + month + '-' + day;
  }
  return '';
}
function defaultFormat(d) {
  if ((0, _DateUtils.isDate)(d)) {
    var year = d.getFullYear();
    var month = '' + (d.getMonth() + 1);
    var day = '' + d.getDate();
    return year + '-' + month + '-' + day;
  }
  return '';
}
function defaultFormat ( d ) { if ( ( 0 , _DateUtils . isDate ) ( d ) ) { var year = d . getFullYear ( ) ; var month = '' + ( d . getMonth ( ) + 1 ) ; var day = '' + d . getDate ( ) ; return year + '-' + month + '-' + day ; } return '' ; }
The default function used to format a Date to String, passed to the `format`
prop.
@param {Date} d
@return {String}
The default function used to format a Date to String passed to the format prop .