I don't think there's a single right answer here—it depends on the likely behaviour the user will want based on what you're searching for. If there is a very high volume defaulting to a single day is a good thing.
For some kinds of data it's very likely the user will want the "to" date to default to now/today.
For some kinds of data they'd want the "from" date to default to the date of the first record in the dataset and the "to" date to default to the date of the last record in the dataset.
So short answer:You have mentioned now that the data is logs and that, so far as you can tell, users are no more likely to want a week's data than a year's.
My recommendation then is to default the "to" date value to now/today (which seems to be naturally the maximum-possible date), let the user change the date if they so choose, and only override their setting if it dependswould lead to a logical error (e.g. if the "from" date defaults to a year ago, they change the "to" date from today to the 1st of January and then change the "from" date to the 1st of February—in that case, since the "from" date is after the "to" date, you can reasonably update the "to" date to match the "from" date; setting both values to 1st of February).
In order to make that more obvious, you should automatically and obviously disable the user from selecting a "to" date that precedes the "from" date. That means if the user notices that their "to" date has changed, they can't go back in and select the previous value, and you can provide clear affordances that the date range must be a positive number of days.