Just to extend @Akser's answer which is logically on the correct track, you can just set the Visible property of the icon to this:
(DateDiff(Now(), DatePicker.SelectedDate) < 180)
Since the expression itself returns true/false, we can omit the call to If.
Also, to test for a target future date, we would set Now() as the first argument to DateDiff. This is because if we were to set the date picker value as the begin date and if the user were to enter a future date, the result would be a negative value in days.