0

我想用给定的日期和时间打开 Thunderbrid-lightning-create 事件对话框。目前我有:

window.open("chrome://calendar/content/calendar-event-dialog.xul",
                      "xulschoolhello-some-window",
                      "chrome,centerscreen")

按预期打开对话框。我现在如何设置日期和时间?

4

1 回答 1

0

查看openEventDialog函数,如果您想手动执行,该函数还在第 434 行定义了一些窗口参数。

/**
 * Opens the event dialog with the given item (task OR event)
 *
 * @param calendarItem      The item to open the dialog with
 * @param calendar          The calendar to open the dialog with.
 * @param mode              The operation the dialog should do ("new", "modify")
 * @param callback          The callback to call when the dialog has completed.
 * @param job               (optional) The job object for the modification.
 * @param initialDate       (optional) The initial date for new task datepickers
 */
function openEventDialog(calendarItem, calendar, mode, callback, job, initialDate) 

您可以直接在 Thunderbird 主窗口的窗口对象上调用此函数。例如,这可以通过将 XUL 覆盖添加到具有最终调用此函数的脚本块的窗口来完成。

于 2016-11-27T13:30:50.627 回答