OverviewFelgo 2 Support (Qt 5) › calendar.selectedDate Event List from firebase?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #21129


    Hello Felgo!

    I have my calendarListModel: [] which I pull from Firebase, now I am having issues creating the events list on the currently selected date in the calendar;

    I either have the entire modelData, or nothing, the result I am looking for would be, for example. That if there are 3 events in the database under the date of 22-2-2019, they will only show in the eventListview when that date is selected, but not any events for other dates stored.

    When I read the data from firebase I push It into an array, code below.


    //after read from Firebase, data is pushed into calendarListModel: [] in my main.qml
    for(var i in value)
        calendarListModel.push({date: new Date(value[i].date).getTime(), status: value[i].status, name: value[i].name, details: value[i].details})
                ListView {
                    model: calendarListModel
                    delegate: Rectangle {
                        Rectangle {
                            width: parent.width
                        Column {
                            id: eventItemColumn
                            Label {
                                id: nameLabel
                            Label {
                                id: detailsLabel
                                text: modelData.details


    I have tried  a number of things such as (and a hell of a lot of variations of the below);



                        for (calendar.selectedDate ; === calendar.selectedDate; ) {
                            model.append({name:, details: calendarListModel.details})


                    model: {
                        if (calendar.selectedDate === {
                            modelData = ({name:, details: calendarListModel.details})
                        else {


    model: {
        var eventModel = calendarListModel.find(
            function(obj) {
            return === calendar.selectedDate;
        if (eventModel === undefined)
    	else {


    calendar.selectedDate(calendarListModel.indexOf( > -1)


    After exhausting options I can think of, and trawling the web, someonehelp!


    Thanks in advance for any advice!




    Felgo Team

    Hi Edward,

    if you do not want to show your full model data, it is required to create an additional filtered version of your big ListModel. You can create an additional filtered listmodel manually, or use the SortFilterProxyModel to apply general sorting or filter settings (in case this suits your use-case).

    This post might be interesting for you:

    It holds many insights for working with models in Felgo and also some simple examples for SortFilterProxyModel.

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support