MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / onOpen

Method onOpen

src/modals/DateTimePickerModal.ts:103–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101 }
102
103 onOpen(): void {
104 const { contentEl } = this;
105 contentEl.empty();
106 contentEl.addClass("tasknotes-plugin", "date-time-picker-modal");
107
108 if (this.options.title) {
109 contentEl.createEl("h3", {
110 text: this.options.title,
111 cls: "date-time-picker-modal__title",
112 });
113 }
114
115 this.renderQuickActions(contentEl);
116 this.renderNaturalLanguageInput(contentEl);
117 this.renderDateInput(contentEl);
118 if (this.shouldShowTime()) {
119 this.renderTimeInput(contentEl);
120 }
121 this.renderActions(contentEl);
122 this.updateSelectButtonState();
123
124 window.setTimeout(() => {
125 this.dateInput?.focus();
126 }, 100);
127 }
128
129 onClose(): void {
130 this.detachDateInputBehavior?.();

Callers

nothing calls this directly

Calls 10

renderQuickActionsMethod · 0.95
renderDateInputMethod · 0.95
shouldShowTimeMethod · 0.95
renderTimeInputMethod · 0.95
renderActionsMethod · 0.95
focusMethod · 0.80
addClassMethod · 0.65
setTimeoutMethod · 0.65

Tested by

no test coverage detected