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

@ -517,8 +517,9 @@ templ AddRecurringDepositForm(spaceID string, accounts []model.MoneyAccountWithB
End Date (optional)
}
@datepicker.DatePicker(datepicker.Props{
ID: "rd-end-date",
Name: "end_date",
ID: "rd-end-date",
Name: "end_date",
Clearable: true,
})
</div>
// Title (optional)
@ -733,10 +734,11 @@ templ EditRecurringDepositForm(spaceID string, rd *model.RecurringDepositWithAcc
Start Date
}
@datepicker.DatePicker(datepicker.Props{
ID: "edit-rd-start-date-" + rd.ID,
Name: "start_date",
Value: rd.StartDate,
Attributes: templ.Attributes{"required": "true"},
ID: "edit-rd-start-date-" + rd.ID,
Name: "start_date",
Value: rd.StartDate,
Required: true,
Clearable: true,
})
</div>
// End Date (optional)
@ -746,14 +748,16 @@ templ EditRecurringDepositForm(spaceID string, rd *model.RecurringDepositWithAcc
}
if rd.EndDate != nil {
@datepicker.DatePicker(datepicker.Props{
ID: "edit-rd-end-date-" + rd.ID,
Name: "end_date",
Value: *rd.EndDate,
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",
ID: "edit-rd-end-date-" + rd.ID,
Name: "end_date",
Clearable: true,
})
}
</div>

View file

@ -249,9 +249,10 @@ templ AddRecurringForm(spaceID string, tags []*model.Tag, methods []*model.Payme
Start Date
}
@datepicker.DatePicker(datepicker.Props{
ID: "recurring-start-date",
Name: "start_date",
Attributes: templ.Attributes{"required": "true"},
ID: "recurring-start-date",
Name: "start_date",
Required: true,
Clearable: true,
})
</div>
// End Date (optional)
@ -260,8 +261,9 @@ templ AddRecurringForm(spaceID string, tags []*model.Tag, methods []*model.Payme
End Date (optional)
}
@datepicker.DatePicker(datepicker.Props{
ID: "recurring-end-date",
Name: "end_date",
ID: "recurring-end-date",
Name: "end_date",
Clearable: true,
})
</div>
// Tags
@ -388,10 +390,11 @@ templ EditRecurringForm(spaceID string, re *model.RecurringExpenseWithTagsAndMet
Start Date
}
@datepicker.DatePicker(datepicker.Props{
ID: "edit-recurring-start-" + re.ID,
Name: "start_date",
Value: re.StartDate,
Attributes: templ.Attributes{"required": "true"},
ID: "edit-recurring-start-" + re.ID,
Name: "start_date",
Value: re.StartDate,
Required: true,
Clearable: true,
})
</div>
// End Date (optional)
@ -401,14 +404,16 @@ templ EditRecurringForm(spaceID string, re *model.RecurringExpenseWithTagsAndMet
}
if re.EndDate != nil {
@datepicker.DatePicker(datepicker.Props{
ID: "edit-recurring-end-" + re.ID,
Name: "end_date",
Value: *re.EndDate,
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",
ID: "edit-recurring-end-" + re.ID,
Name: "end_date",
Clearable: true,
})
}
</div>