Calendar Dates in Leave Application

Currently i have chosen two days for leave application in calendar view (8-9) JULY

but after selection it shows different date in form view (8-10) JULY

Does the same problem occur if you a choose a certain time in both dates. say leave from 8 July 0000 HRS to 9 July 2359 HRS

its Date field not Date time

I know but if you double click on date, then it will show times too. select any random time in those dates and see what you get

it works with when select one date and any time but i need (FROM_TO) Dates

I’m assuming that the dates are being selected like this :-

It took 8th July 2018 0000 HRS as From date and then 10th July 2018 0000 HRS, that is why you are getting these dates.

Hello ,

I am getting error in LEAVE APPLICATION CALENDAR.Here the following Error:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 61, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1026, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/hr/doctype/leave_application/leave_application.py”, line 486, in get_events
add_leaves(events, start, end, conditions)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/hr/doctype/leave_application/leave_application.py”, line 528, in add_leaves
for d in frappe.db.sql(query, {“start”:start, “end”: end}, as_dict=True):
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 199, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 732, in _read_query_result
result.read()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1075, in read
first_packet = self.connection._read_packet()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 684, in _read_packet
packet.check_error()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
ProgrammingError: (1064, u’You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘and ifnull(tabLeave Application.status, “”) != “Rejected”’ at line 6’)