Sort All-Day Calendar View Items

I have a calendar view that only contains all-day items. The calendar Display setting is set to List. I am not sure the order in which the view is choosing to display the items for each day.

I have a field that I use for the Label Field, which I would like to be able to sort alphabetically. I tried setting the the default Sort Order from Object Settings, but that appears to have no effect on the calendar view. Is there any way to do this?

Thanks–

I have a similar issue with an app I’m working on. A list details view doesn’t sort chronologically even though the sort order has been configured in the connected record. The Knack team provided some explanation for this but I’m unable to recollect it now.

I just wrote a custom function to use the data available in the view to sort and update the content as needed. Let me know if you’d like the code snippet.

Hi @Arjun, is this in a Calendar list view, or a regular list view? If it’s a calendar view I would like to take a look at the code snippet. Thank you.

Hi @Arjun me too - I have need to allow users to manually sort items in a calendar list view for all-day events. This might point me in the right direction - could I see the code snippet please.

My code is specifically for a details view with a connected field showing a list of items with date in front of it. Not sure how useful it’ll be but PFB the code snippet:

$(document).on('knack-view-render.view_113', function (event, view, records) {
    var objectSet = [];
    $("div.kn-detail.field_334 > div.kn-detail-body > span > span > a").each(function (i) {
        var date = moment(new Date("01" + $(this).text().split(":")[0].replace("- ", ""))).format("DD MMM YYYY");
        $(this).next().remove();
        objectSet.push({
            content: $(this).text(),
            date: date,
            eq: i
        });
    });
    const sortedObjectSets = objectSet.slice().sort((a, b) => new Date(b.date) - new Date(a.date));
    for (var i = 0; i < sortedObjectSets.length; i++) {
        if (i !== sortedObjectSets[i].eq) {
            var test = ($("div.kn-detail.field_334 > div.kn-detail-body > span > span > a:eq(" + parseInt(sortedObjectSets[i].eq) + ")").detach());
            if ($("div.kn-detail.field_334 > div.kn-detail-body > span > span > a:eq(" + parseInt(i) + ")").length === 0) {
                var n = parseInt(i - 1);
            } else {
                var n = parseInt(i);
            }
            test.insertAfter($("div.kn-detail.field_334 > div.kn-detail-body > span > span > a:eq(" + n + ")"));
        }
    }
    $("div.kn-detail.field_334 > div.kn-detail-body > span > span > a").each(function (i) {
        ($(this).after("<br>"));
    });
});

Thanks.

Not exactly what I need as I have moved now from Calendar to a simple list. I need the ability for the end user to drag and drop the records in a simple list into whatever order they need, and have this reflected on all user (ie not just the local ui for that user).

Any ideas if this can even be achieved? Any help great appreciated!