我想打开具有给定日期和时间的thunderbrid-lightning-create事件对话框。 目前我有:
window.open("chrome://calendar/content/calendar-event-dialog.xul",
"xulschoolhello-some-window",
"chrome,centerscreen")
按预期打开Dialog。我现在如何设置日期和时间?
答案 0 :(得分: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覆盖来完成,该窗口具有最终调用此函数的脚本块。