Calendar Sorting

Hello everyone!!

I created a calendar for issue doctype. I added custom fields: due_date and due_time in issue doctype. The display in calendar is based on due_date. If there are more than 1 issue in a due_date , the current sorting is alphabetical. I want to sort it by due_time and remove the alphabetical sorting.

I already tried sorting the issues in calendar.js file but the alphabetical sorting still persists
I also tried tracing the alphabetical sorting from calendar.js, unfortunately, i didnt find it :slight_smile:
Is it possible to change the sorting to due_time and remove the alphabetical? or Is there another way in sorting it by due_time (if the due_date of issues are the same)?

Any help will be very much appreciated :smiley:

One workaround could be to create a datetime field (combining your date and time fields) on the doctype and use that as your “calendar” date.

That should solve the sorting issues.

How do you combine a date and a time to make a datetime field in frappe?
Thanks

There is already a datetime field type available. Which version are you using?

V13

I used datetime.datetime.combine(getdate(field1), get_time(field2))

Is there another method?