I'm creating a calendar web app that shows each day's memos I took.

It looks like this, and I wanted to add a "swipe" gesture for mobile users.
And then, I realized swiperjs. I created a swiper with only 1 slide and gave it a loop. It worked perfectly.
But the problem is that the swiper index always gives me 1.
Using event listeners (like slideChange) I need to detect the swipe direction and load the next day's memos.
Is there a specific event listener (something like swipeLeft) or a value returned that gives me the direction?
Finally found it.
on: {
slideChange: (swiper) => {
console.log(swiper.touches.diff < 0);
}
}
Returns true when swipe right, false when left.
NOTE:
swiper.touches.diff will be 0 when the slide is changed by the Navigation Arrows. To do that add event listeners to the buttons, too.
For me this works well
const direction = swiper.touches.startX > swiper.touches.currentX ? 'forward' : 'backward';