Completed the work. Now the date range filter works as expected. Things to do: Refactor code.