diff --git a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.js b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.js index 93cb9402fa..d085a330fd 100644 --- a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.js +++ b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.js @@ -4,16 +4,12 @@ frappe.query_reports["Daily Timesheet Summary"] = { "filters": [ { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today() - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today() + "fieldname":"date", + "label": __("Date"), + "fieldtype": "DateRange", + "start_with_value": true, + "default_from":frappe.datetime.get_today(), + "default_to":frappe.datetime.get_today(), }, ] } diff --git a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py index 682fb2e09d..6ed3b5801f 100644 --- a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py +++ b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py @@ -9,7 +9,9 @@ from frappe.desk.reportview import build_match_conditions def execute(filters=None): if not filters: filters = {} - elif filters.get("from_date") or filters.get("to_date"): + elif filters.get("date") : + filters["from_date"] = filters["date"][0] + filters["to_date"] = filters["date"][1] filters["from_time"] = "00:00:00" filters["to_time"] = "24:00:00"