From a91ba10b627c5b06b06930df615a2c227b097c71 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 15 May 2017 09:18:09 -0400 Subject: [PATCH] setting the event date search TO to the same value as the FROM on change adding automatic date setting in the date search section of the events list view so that you have the same TO date as the FROM date when the FROM date is changed --- views/front/events/agenda.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/views/front/events/agenda.html b/views/front/events/agenda.html index 1d62e74..afc1825 100644 --- a/views/front/events/agenda.html +++ b/views/front/events/agenda.html @@ -143,6 +143,8 @@ var current_year = $('{$current_year}'); var retain_date; + // add 7 days to ensure we always get the current month and not any other month view that may + // be visible (last few days of previous month or first few days of next month) function get_current_view(){ var retain_date; var calCurrDate = $('#eventCalendar').fullCalendar('getView').start; @@ -157,10 +159,15 @@ return false; } } + + $('#glm-event-from').on("change", function(){ + var from_date = $(this).val(); + $('#glm-event-to').val(from_date); + + }); months = JSON.parse(months); -// console.log(sessionStorage.view + " : " + sessionStorage.override); event_search.on('click', function(){ sessionStorage.override = 'yes'; }); -- 2.17.1