From 9ed9dc8fc590501740b7cd3745884eb61e4f321e Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Thu, 2 Jan 2025 09:34:20 +0530 Subject: [PATCH] stock module 2 vadivel J 02-12-2025 --- app/Views/gasStockDetails.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/Views/gasStockDetails.php b/app/Views/gasStockDetails.php index 40ff4530..eaf6400c 100644 --- a/app/Views/gasStockDetails.php +++ b/app/Views/gasStockDetails.php @@ -753,6 +753,29 @@ function convertToDate(dateString) { $(document).ready(function() { $('#fromDateFilter ').select2(); $('#toDateFilter ').select2(); + initialFilterDate(); }); + + function initialFilterDate(){ + + let fromDate = $('#fromDateFilter').val(); //01-12-2024 + let toDate = $('#toDateFilter').val(); //05-12-2024 + + console.log("from Date and to date ..!!") + console.log(fromDate,toDate); + + $('#gasStockDetailsTableId').find('tbody tr').each(function() { + const rowCells = $(this).find('td'); + let tableDate = rowCells.eq(0).text(); + let result = checkDateRange(fromDate,toDate,tableDate); + if (result) { + $(this).show(); + } else { + $(this).hide(); + } + + }); + + } \ No newline at end of file