From c9215a9a4e929eaf324c593158e0e80277761c6f Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Wed, 4 Oct 2023 16:46:24 +0200 Subject: [PATCH] Added a workaround for the not working `customRangeLabel` option of the daterangepicker component (fixes #2353) --- public/viewjs/stockreportspendings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/viewjs/stockreportspendings.js b/public/viewjs/stockreportspendings.js index 57b72fdd..1231118d 100644 --- a/public/viewjs/stockreportspendings.js +++ b/public/viewjs/stockreportspendings.js @@ -116,7 +116,6 @@ $("#daterange-filter").daterangepicker({ }, "applyLabel": __t("Apply"), "cancelLabel": __t("Cancel"), - "customRangeLabel": __t("Custom range"), "ranges": ranges }, function(start, end, label) { @@ -124,6 +123,7 @@ $("#daterange-filter").daterangepicker({ UpdateUriParam("end_date", end.format("YYYY-MM-DD")) window.location.reload(); }); +$('[data-range-key="Custom Range"]').text(__t("Custom range")); // customRangeLabel option doesn't work, however $("#daterange-filter").on("cancel.daterangepicker", function(ev, picker) {