Compare commits

..

No commits in common. "0200b4ef384714e356067bef02482739917076a2" and "99564c02d0f31d8ec83d5d241410330458ba5a41" have entirely different histories.

3 changed files with 4 additions and 9 deletions

View File

@ -33,7 +33,7 @@ classifiers = [
"Topic :: Office/Business :: Financial :: Accounting",
]
dependencies = [
"Flask",
"flask",
"SQLAlchemy >= 2",
"Flask-SQLAlchemy",
"Flask-WTF",
@ -42,7 +42,8 @@ dependencies = [
]
[project.optional-dependencies]
devel = [
test = [
"unittest",
"httpx",
"OpenCC",
]

View File

@ -67,6 +67,7 @@ def show_add_journal_entry_form(journal_entry_type: JournalEntryType) -> str:
form.validate()
else:
form = journal_entry_op.form()
form.date.data = dt.date.today()
return journal_entry_op.render_create_template(form)

View File

@ -135,13 +135,6 @@ class JournalEntryForm {
};
this.#resetDeleteCurrencyButtons();
this.#initializeDragAndDropReordering();
if (this.#date.value === "") {
const now = new Date();
const year = String(now.getFullYear()).padStart(4, "0");
const month = String(now.getMonth() + 1).padStart(2, "0");
const day = String(now.getDate()).padStart(2, "0");
this.#date.value = `${year}-${month}-${day}`;
}
this.#date.onchange = () => this.#validateDate();
this.#note.onchange = () => this.#validateNote();
this.#element.onsubmit = () => {