Searching answers by start date and end date JS functional