Calendar price change depending on weekday or weekend

Hi, I have currently added a range calendar for my booking using flatpickr. I was able to get everything working perfectly. The only problem I am having is, I now need to be able to change the price depending on what day of the week it is. So there is a week day price and weekend price booking for the hotel. I will leave the read-only link down below, thank you for any help!


1 Like

SA5 has a dynamic filtering lib that can evaluate expressions like the current date and show/hide items accordingly

Check my JS expression but I think you’d want this custom attribute on your element that should be shown only on weekends;

wfu-filter-eval = new Date().getDay() % 6 === 0

And this one for weekdays;

wfu-filter-eval = new Date().getDay() % 6 !== 0
1 Like