GeoffZhu / vue-event-calendar

A simple events calendar for Vue2, no dependencies except Vue2.

Home Page:http://geoffzhu.cn/vue-event-calendar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

this.$EventCalendar.toDate(today) 失败

shufangjian opened this issue · comments

let today = new Date() today = today.getFullYear()}/${today.getMonth() + 1}/${today.getDate()} this.$EventCalendar.toDate(today)

this.$EventCalendar.toDate(today) 此处无作用, 希望在demo中体现下

mounted中调用此方法

loadShedule(){
		let userId = this.$route.params.userId,that = this;
		let params = {userId:userId};
		Api.GetScheduleListByUserId(params).then(res => {
                     if(res){
                           this.demoEvents = that.transData(res.datas);
            	           //console.log(this.demoEvents);
            	          //console.log(this.demoEvents)
			  let today = new Date()
			  console.log(this.$EventCalendar)
			  this.$EventCalendar.toDate('2017/09/14')
            	          //this.$EventCalendar.toDate()
                       }
               })
}

在我这里是生效的,不论是this.$EventCalendar.toDate('2017/9/14'), 还是this.$EventCalendar.toDate('2017/09/14') @shufangjian , 最好提供个不生效的demo