How to filter data collection by date and then showing sum of specific column for only user who entered this data

I have data collection as below

I am collecting these data from Loged In users. Now i want to display sum of calorie on a specific day selected by user, For this i am able to do sum of calorie, user specific. However, I am not able to filter it by dates. Can you please suggest how to add date filters in code so that user can select date range and accordingly, code will display total calorie for between dates. Below is my code.

import wixData from ‘wix-data’ ;
import wixUsers from ‘wix-users’ ;

let user = wixUsers . currentUser ;

let userId = user . id ;
let isLoggedIn = user . loggedIn ;

user . getEmail ()
. then (( email ) => {
let userEmail = email ;
});
$w . onReady (() => {
Sum_amount ();
});
let having = wixData . filter (). eq ( “_owner” , userId )
export function Sum_amount ( ) {
wixData . aggregate ( “Diettracking” )
. group ( “_owner” )
. having ( having )
. sum ( “calorie” , “sumamount” )
. run ()
. then (( results ) => {
$w ( ‘#input4’ ). value = results . items [ 0 ]. sumamount ;

    }); 

}