From 9d9440277c43a7b6f32253b6dd9352b620f74c2c Mon Sep 17 00:00:00 2001 From: Anurag Mishra <32095923+Anurag810@users.noreply.github.com> Date: Mon, 27 May 2019 13:20:42 +0530 Subject: [PATCH] fix: holidays was showing on same date in calendar view (#17754) --- erpnext/hr/doctype/holiday_list/holiday_list.py | 1 + erpnext/hr/doctype/holiday_list/holiday_list_calendar.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.py b/erpnext/hr/doctype/holiday_list/holiday_list.py index d6e0aea3de..e475e6e95b 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list.py +++ b/erpnext/hr/doctype/holiday_list/holiday_list.py @@ -79,6 +79,7 @@ def get_events(start, end, filters=None): filters.append(['Holiday', 'holiday_date', '>', getdate(start)]) if end: filters.append(['Holiday', 'holiday_date', '<', getdate(end)]) + return frappe.get_list('Holiday List', fields=['name', '`tabHoliday`.holiday_date', '`tabHoliday`.description', '`tabHoliday List`.color'], filters = filters, diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js index 507d070444..3cc8dd5036 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js +++ b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js @@ -3,8 +3,8 @@ frappe.views.calendar["Holiday List"] = { field_map: { - "start": "from_date", - "end": "to_date", + "start": "holiday_date", + "end": "holiday_date", "id": "name", "title": "description", "allDay": "allDay"