Query entries with dates between two dates

This will also not work:

$match: {
                    startDate: {
                        $and: [
                            {
                                $gte: ["$startDate", new Date(startDate)]
                            },
                            {
                                $lte: ["$startDate", new Date(endDate)]
                            }
                        ]
                    },
                    endDate: {
                        $and: [
                            {
                                $lte: ["$endDate", new Date(endDate)]
                            },
                            {
                                $gte: ["$endDate", new Date(startDate)]
                            }
                        ]
                    },
            }