From 3adf743ec060fea1fc9e68aa7445a058416a6706 Mon Sep 17 00:00:00 2001 From: levin Date: Tue, 22 Oct 2024 16:57:20 +0000 Subject: [PATCH] bug fixed: date was not going backwards --- lib/algground_web/live/pages/live_home_page.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/algground_web/live/pages/live_home_page.ex b/lib/algground_web/live/pages/live_home_page.ex index c17d118..1b06275 100644 --- a/lib/algground_web/live/pages/live_home_page.ex +++ b/lib/algground_web/live/pages/live_home_page.ex @@ -91,8 +91,8 @@ defmodule AlggroundWeb.LiveHomePage do |> assign(:rainfall_levels, new_rainfalls) |> assign(:reservoir_levels, new_reservoirs) |> assign(:regions, regions) - |> assign(:date_start, Datex.Date.add(socket.assigns.date_start, 92)) - |> assign(:date_end, Datex.Date.add(socket.assigns.date_end, 92))} + |> assign(:date_start, Datex.Date.add(socket.assigns.date_start, -92)) + |> assign(:date_end, Datex.Date.add(socket.assigns.date_end, -92))} end def handle_event("forward", _params, socket) do