Added checks for min and max date before trying to set the date to one of them in the cause of the date being outside the valid range.
The scenario this supports is when you only have a min date specified and the selected date is less than that date. Currently it crashes when trying to read the full year of the max date which would be null because only a min date is specified.
Added checks for min and max date before trying to set the date to one of them in the cause of the date being outside the valid range.
The scenario this supports is when you only have a min date specified and the selected date is less than that date. Currently it crashes when trying to read the full year of the max date which would be null because only a min date is specified.