From e0942ef979cf098191c5f7c0510be975e6046aa1 Mon Sep 17 00:00:00 2001 From: Urkorue Date: Fri, 21 Feb 2025 13:31:01 +0100 Subject: [PATCH 1/2] CLMS-284449 (bug): Cart calendar date application bug solved --- .../CLMSDownloadCartView/Fields/TimeseriesPicker.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/CLMSDownloadCartView/Fields/TimeseriesPicker.jsx b/src/components/CLMSDownloadCartView/Fields/TimeseriesPicker.jsx index 27427195..e77607cd 100644 --- a/src/components/CLMSDownloadCartView/Fields/TimeseriesPicker.jsx +++ b/src/components/CLMSDownloadCartView/Fields/TimeseriesPicker.jsx @@ -27,12 +27,13 @@ export const TimeseriesPicker = (props) => { : null, ); const [isOpen, setIsOpen] = useState(false); + const [datesApplied, setDatesApplied] = useState(false); const isValidDateRange = ({ start, end, limit }) => { /* Calculate if the difference in days is smaller than the allowed limit */ const oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds const diffDays = Math.round(Math.abs((start - end) / oneDay)); - return diffDays < limit; + return diffDays <= limit; }; const dates_array = data_arrays?.map((e) => new Date(e)); return ( @@ -61,7 +62,7 @@ export const TimeseriesPicker = (props) => {
- {item.TemporalFilter + {item.TemporalFilter && datesApplied ? `${cclDateFormat( item.TemporalFilter.StartDate, )}-${cclDateFormat(item.TemporalFilter.EndDate)}` @@ -202,6 +203,7 @@ export const TimeseriesPicker = (props) => { StartDate: startValue, EndDate: endValue, }); + setDatesApplied(true); setIsOpen(false); }} > From 0163580ae69204e1788a14a4f5946ddb075f4c44 Mon Sep 17 00:00:00 2001 From: EEA Jenkins <@users.noreply.github.com> Date: Fri, 21 Feb 2025 13:03:33 +0000 Subject: [PATCH 2/2] Automated release 1.1.214 --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb57d05c..9f31ac92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +### [1.1.214](https://github.com/eea/volto-clms-theme/compare/1.1.213...1.1.214) - 21 February 2025 + ### [1.1.213](https://github.com/eea/volto-clms-theme/compare/1.1.212...1.1.213) - 20 February 2025 #### :bug: Bug Fixes diff --git a/package.json b/package.json index d6e3e07c..8088f03d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-clms-theme", - "version": "1.1.213", + "version": "1.1.214", "description": "volto-clms-theme: Volto theme for CLMS site", "main": "src/index.js", "author": "CodeSyntax for the European Environment Agency",