{"size": 1511, "ext": "js", "max_stars_repo_path": "mpt2/pages/vant-test/vt4.js", "max_stars_repo_name": "dvvj/minip", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "mpt2/pages/vant-test/vt4.js", "max_issues_repo_name": "dvvj/minip", "max_issues_repo_issues_event_min_datetime": "2020-07-17T16:18:12.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-24T06:27:55.000Z", "max_forks_repo_path": "mpt2/pages/vant-test/vt4.js", "max_forks_repo_name": "dvvj/minip", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 16.7888888889, "max_line_length": 63, "alphanum_fraction": 0.5473196559}
// pages/vant-test/vt4.js
Page({

  /**
   * Page initial data
   */
  data: {
    minHour: 10,
    maxHour: 20,
    minDate: new Date().getTime(),
    maxDate: new Date(2019, 10, 1).getTime(),
    currentDate: new Date().getTime(),
    formatter(type, value) {
      if (type === 'year') {
        return `${value}年`;
      } else if (type === 'month') {
        return `${value}月`;
      }
      return value;
    }
  },
  onInput(event) {
    console.log('e: ', event)
    let date = new Date(event.detail)
    let t = {
      year: date.getFullYear(),
      month: date.getMonth(),
      day: date.getDate()
    }
    console.log('t: ', t)
    this.setData({
      currentDate: event.detail //.value
    });
  },
  /**
   * Lifecycle function--Called when page load
   */
  onLoad: function (options) {

  },

  /**
   * Lifecycle function--Called when page is initially rendered
   */
  onReady: function () {

  },

  /**
   * Lifecycle function--Called when page show
   */
  onShow: function () {

  },

  /**
   * Lifecycle function--Called when page hide
   */
  onHide: function () {

  },

  /**
   * Lifecycle function--Called when page unload
   */
  onUnload: function () {

  },

  /**
   * Page event handler function--Called when user drop down
   */
  onPullDownRefresh: function () {

  },

  /**
   * Called when page reach bottom
   */
  onReachBottom: function () {

  },

  /**
   * Called when user click on the top right corner to share
   */
  onShareAppMessage: function () {

  }
})