mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 18:42:28 +08:00
fix: 🐛 fix calendar option error
This commit is contained in:
parent
a80932d3f9
commit
ae7aaaf263
@ -58,7 +58,7 @@ const TPL = `
|
||||
<div class="option-row min-days-row" style="display: none;">
|
||||
<label for="min-days-in-first-week">${t("i18n.min-days-in-first-week")}</label>
|
||||
<select id="min-days-in-first-week" class="form-select">
|
||||
${Array.from({length: 7}, (_, i) => i + 1)
|
||||
${Array.from({ length: 7 }, (_, i) => i + 1)
|
||||
.map(num => `<option value="${num}">${num}</option>`)
|
||||
.join('')}
|
||||
</select>
|
||||
@ -148,6 +148,8 @@ export default class LocalizationOptions extends OptionsWidget {
|
||||
} else {
|
||||
$minDaysRow.hide();
|
||||
}
|
||||
|
||||
this.updateOption("firstWeekOfYear", value);
|
||||
});
|
||||
|
||||
const currentValue = this.$widget.find('input[name="first-week-of-year"]:checked').val();
|
||||
@ -156,7 +158,7 @@ export default class LocalizationOptions extends OptionsWidget {
|
||||
}
|
||||
|
||||
this.$widget.find("#min-days-in-first-week").on("change", () => {
|
||||
const minDays = String(this.$widget.find("#min-days-in-first-week").val());
|
||||
const minDays = this.$widget.find("#min-days-in-first-week").val();
|
||||
this.updateOption("minDaysInFirstWeek", minDays);
|
||||
});
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { FilterOptionsByType, OptionDefinitions, OptionMap, OptionNames } from "../../../../../services/options_interface.js";
|
||||
import type { FilterOptionsByType, OptionMap, OptionNames } from "../../../../../services/options_interface.js";
|
||||
import type { EventData, EventListener } from "../../../components/app_context.js";
|
||||
import type FNote from "../../../entities/fnote.js";
|
||||
import { t } from "../../../services/i18n.js";
|
||||
@ -45,7 +45,7 @@ export default class OptionsWidget extends NoteContextAwareWidget implements Eve
|
||||
$checkbox.prop("checked", optionValue === "true");
|
||||
}
|
||||
|
||||
optionsLoaded(options: OptionMap) {}
|
||||
optionsLoaded(options: OptionMap) { }
|
||||
|
||||
async refresh() {
|
||||
this.toggleInt(this.isEnabled());
|
||||
|
@ -72,6 +72,8 @@ const ALLOWED_OPTIONS = new Set<OptionNames>([
|
||||
"locale",
|
||||
"formattingLocale",
|
||||
"firstDayOfWeek",
|
||||
"firstWeekOfYear",
|
||||
"minDaysInFirstWeek",
|
||||
"languages",
|
||||
"textNoteEditorType",
|
||||
"textNoteEditorMultilineToolbar",
|
||||
|
Loading…
x
Reference in New Issue
Block a user