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:
Hayden 2023-01-28 13:32:39 -09:00 committed by GitHub
parent 6ed1f3695a
commit cbac17c059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 122 deletions

View file

@ -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) }),
});
}