fix(dashboard): #163 month selection on first load
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 5m18s
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 5m18s
This commit is contained in:
@@ -81,7 +81,7 @@ func (handler IndexImpl) dashboard(user *types.User, htmx bool, r *http.Request)
|
||||
return nil, fmt.Errorf("could not parse timestamp: %w", service.ErrBadRequest)
|
||||
}
|
||||
} else {
|
||||
month = time.Now()
|
||||
month = time.Now().UTC()
|
||||
}
|
||||
|
||||
summary, err := handler.d.Summary(r.Context(), user, month)
|
||||
|
||||
@@ -9,7 +9,7 @@ templ Dashboard(summary *types.DashboardMonthlySummary) {
|
||||
<input
|
||||
name="month"
|
||||
type="date"
|
||||
class="input"
|
||||
class="input datetime"
|
||||
value={ summary.Month.String() }
|
||||
/>
|
||||
</form>
|
||||
|
||||
@@ -17,6 +17,7 @@ function updateTime() {
|
||||
const newDate = value.includes("UTC") ? new Date(value) : value;
|
||||
el.valueAsDate = newDate;
|
||||
}
|
||||
el.classList.remove("datetime");
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user