chore: update datepickers to use new API interface for clearable date
All checks were successful
Deploy / build-and-deploy (push) Successful in 2m23s

This commit is contained in:
juancwu 2026-02-24 15:34:28 +00:00
commit 40fe5ffe20
3 changed files with 53 additions and 39 deletions

View file

@ -519,6 +519,7 @@ templ AddRecurringDepositForm(spaceID string, accounts []model.MoneyAccountWithB
@datepicker.DatePicker(datepicker.Props{
ID: "rd-end-date",
Name: "end_date",
Clearable: true,
})
</div>
// Title (optional)
@ -736,7 +737,8 @@ templ EditRecurringDepositForm(spaceID string, rd *model.RecurringDepositWithAcc
ID: "edit-rd-start-date-" + rd.ID,
Name: "start_date",
Value: rd.StartDate,
Attributes: templ.Attributes{"required": "true"},
Required: true,
Clearable: true,
})
</div>
// End Date (optional)
@ -749,11 +751,13 @@ templ EditRecurringDepositForm(spaceID string, rd *model.RecurringDepositWithAcc
ID: "edit-rd-end-date-" + rd.ID,
Name: "end_date",
Value: *rd.EndDate,
Clearable: true,
})
} else {
@datepicker.DatePicker(datepicker.Props{
ID: "edit-rd-end-date-" + rd.ID,
Name: "end_date",
Clearable: true,
})
}
</div>

View file

@ -251,7 +251,8 @@ templ AddRecurringForm(spaceID string, tags []*model.Tag, methods []*model.Payme
@datepicker.DatePicker(datepicker.Props{
ID: "recurring-start-date",
Name: "start_date",
Attributes: templ.Attributes{"required": "true"},
Required: true,
Clearable: true,
})
</div>
// End Date (optional)
@ -262,6 +263,7 @@ templ AddRecurringForm(spaceID string, tags []*model.Tag, methods []*model.Payme
@datepicker.DatePicker(datepicker.Props{
ID: "recurring-end-date",
Name: "end_date",
Clearable: true,
})
</div>
// Tags
@ -391,7 +393,8 @@ templ EditRecurringForm(spaceID string, re *model.RecurringExpenseWithTagsAndMet
ID: "edit-recurring-start-" + re.ID,
Name: "start_date",
Value: re.StartDate,
Attributes: templ.Attributes{"required": "true"},
Required: true,
Clearable: true,
})
</div>
// End Date (optional)
@ -404,11 +407,13 @@ templ EditRecurringForm(spaceID string, re *model.RecurringExpenseWithTagsAndMet
ID: "edit-recurring-end-" + re.ID,
Name: "end_date",
Value: *re.EndDate,
Clearable: true,
})
} else {
@datepicker.DatePicker(datepicker.Props{
ID: "edit-recurring-end-" + re.ID,
Name: "end_date",
Clearable: true,
})
}
</div>

View file

@ -252,7 +252,8 @@ templ AddBudgetForm(spaceID string, tags []*model.Tag) {
@datepicker.DatePicker(datepicker.Props{
ID: "budget-start-date",
Name: "start_date",
Attributes: templ.Attributes{"required": "true"},
Required: true,
Clearable: true,
})
</div>
// End Date (optional)
@ -263,6 +264,7 @@ templ AddBudgetForm(spaceID string, tags []*model.Tag) {
@datepicker.DatePicker(datepicker.Props{
ID: "budget-end-date",
Name: "end_date",
Clearable: true,
})
</div>
<div class="flex justify-end">
@ -363,7 +365,8 @@ templ EditBudgetForm(spaceID string, b *model.BudgetWithSpent, tags []*model.Tag
ID: "edit-budget-start-" + b.ID,
Name: "start_date",
Value: b.StartDate,
Attributes: templ.Attributes{"required": "true"},
Clearable: true,
Required: true,
})
</div>
// End Date
@ -376,11 +379,13 @@ templ EditBudgetForm(spaceID string, b *model.BudgetWithSpent, tags []*model.Tag
ID: "edit-budget-end-" + b.ID,
Name: "end_date",
Value: *b.EndDate,
Clearable: true,
})
} else {
@datepicker.DatePicker(datepicker.Props{
ID: "edit-budget-end-" + b.ID,
Name: "end_date",
Clearable: true,
})
}
</div>