离子当地通知周日

时间:2018-12-17 13:36:19

标签: ionic-framework ionic3

我正在尝试从datepicker安排每周通知,一切正常,除非用户选择周日作为安排通知的日期,星期日是0天,并且我将该计划设为空

let today = new Date(this.data.date);
          let hour = today.getUTCHours();
          let minutes = today.getMinutes();
          this.weekly = today.getDay();

          this.id = res.insertId;
          db.executeSql("UPDATE payments SET reminder = ? WHERE rowid = ?",[this.id,this.rowid])

          this.localNotifications.schedule({
            id: this.id,
            text: 'Weekly Reminder for '+ this.data.description+ ' '+ 'Amount: €' + this.data.amount,
            every: {  count: 1,  weekday: this.weekly, hour: hour, minute: minutes, second: 1  },
            data: {"id":  this.id, "name": "Mr.A"},
            foreground: true,  


         });

0 个答案:

没有答案