refactor(reporting): clarify date parsing in allocation controller and frontend

- Updated comments to specify date parsing format as 'YYYY-MM-DD'.
- Modified date range handling in the frontend to format dates using date-fns for consistency.
This commit is contained in:
chamiakJ
2025-05-20 09:23:22 +05:30
parent 3b59a8560b
commit 14d8f43001
2 changed files with 9 additions and 2 deletions

View File

@@ -412,7 +412,7 @@ export default class ReportingAllocationController extends ReportingControllerBa
let startDate: moment.Moment;
let endDate: moment.Moment;
if (date_range && date_range.length === 2) {
// Parse dates without timezone
// Parse simple YYYY-MM-DD dates
startDate = moment(date_range[0]).startOf('day');
endDate = moment(date_range[1]).endOf('day');