Replace current date with graph begin and end date range.
Correct get_dates function period ranges.