我可以在我的日历中设置一个事件.我的代码是
var ev = new tizen.CalendarEvent
({
description : document.getElementById('des').value,
summary : document.getElementById('summ').value,
startDate : new tizen.TZDate(yy, mm, dd, h, m),
duration : new tizen.TimeDuration(dur1, "HOURS"),
location : document.getElementById('loc').value,
});
Run Code Online (Sandbox Code Playgroud)
我怎么能设置calendarAlarm事件呢?即我想为事件启用警报.如果有人知道,请给出代码.
提前致谢.
最后我得到了答案
calendar = tizen.calendar.getDefaultCalendar("EVENT");
var ev = new tizen.CalendarEvent({
description : document.getElementById('description1').value,
summary : document.getElementById('Summary1').value,
startDate : new tizen.TZDate(yy, mm, dd, h, m),
duration : new tizen.TimeDuration(dur1, "HOURS"),
location : document.getElementById('Location1').value,
var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(1, "MINS"), "SOUND");
ev.alarms = [alarm];
calendar.add(ev);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
624 次 |
| 最近记录: |