mirror of
https://github.com/stfrigerio/sqliteDB.git
synced 2026-07-22 05:38:02 +00:00
fixed wrong selected date
This commit is contained in:
parent
f97f55ff67
commit
a760527acf
1 changed files with 1 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ export class DatePickerModal extends Modal {
|
|||
|
||||
const confirmBtn = footer.createEl("button", { text: "Select", cls: "mod-cta" }); // Use Obsidian's primary button style
|
||||
confirmBtn.onclick = () => {
|
||||
const iso = this.selectedDate.toISOString().split("T")[0];
|
||||
const iso = `${this.selectedDate.getFullYear()}-${String(this.selectedDate.getMonth() + 1).padStart(2, '0')}-${String(this.selectedDate.getDate()).padStart(2, '0')}`;
|
||||
pluginState.selectedDate = iso; // Update global state
|
||||
new Notice(`Date set to ${iso}`);
|
||||
// Optional: Force re-render if your plugin uses the date reactively in preview
|
||||
|
|
|
|||
Loading…
Reference in a new issue