mirror of
https://github.com/hay-kot/homebox.git
synced 2025-05-23 13:52:26 +00:00
feat: use native date picker + align date formats (#251)
* use native date picker * use YYYY-MM-DD for date formats
This commit is contained in:
parent
6ed1f3695a
commit
cbac17c059
3 changed files with 31 additions and 122 deletions
|
@ -1,7 +1,7 @@
|
|||
import { BaseAPI, route } from "../base";
|
||||
import { GroupStatistics, TotalsByOrganizer, ValueOverTime } from "../types/data-contracts";
|
||||
|
||||
function YYYY_DD_MM(date?: Date): string {
|
||||
function YYYY_MM_DD(date?: Date): string {
|
||||
if (!date) {
|
||||
return "";
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ function YYYY_DD_MM(date?: Date): string {
|
|||
export class StatsAPI extends BaseAPI {
|
||||
totalPriceOverTime(start?: Date, end?: Date) {
|
||||
return this.http.get<ValueOverTime>({
|
||||
url: route("/groups/statistics/purchase-price", { start: YYYY_DD_MM(start), end: YYYY_DD_MM(end) }),
|
||||
url: route("/groups/statistics/purchase-price", { start: YYYY_MM_DD(start), end: YYYY_MM_DD(end) }),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue