dateTo fixed to use endOfDay instead of startOfDay

This fixes a bug where if you select a date first which is greater then the date selected second the time period is 00:00-00:00 instead of 00:00-23:59