GeoffZhu / vue-event-calendar

A simple events calendar for Vue2, no dependencies except Vue2.
http://geoffzhu.cn/vue-event-calendar/
635 stars 228 forks source link

this.$EventCalendar.toDate(today) 失败 #56

Closed shufangjian closed 7 years ago

shufangjian commented 7 years ago

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

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

shufangjian commented 7 years ago

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()
                       }
               })
}
GeoffZhu commented 7 years ago

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