I have done something like this using QUERY JSON with SQL as a resource type
select * from (yourdatatobefiltered) where ((value_date >= {{ valueDateRangeFilter.value.start}} and value_date <= {{ valueDateRangeFilter.value.end}}) OR ({{valueDateRangeFilter.value.start == ''}} AND {{valueDateRangeFilter.value.end == ''}}))
and there is also
a tip here: [how-to] Write a query that filters data using a date range component