Last Updated: 22 Nov 2022 14:52 by Martin Ivanov
Martin Ivanov
Created on: 22 Nov 2022 14:52
Category: DatePicker
Type: Feature Request
DatePicker: Allow to skip the time part of the DateTime object when deciding if a segment list item should be enabled or disabled
The DatePicker allows you to set the MinValue and MaxValue properties that limits the selectable dates in the control. In that case, all values outside of the min/max range will be displayed as greyed out (disabled) numbers for the different segments - day, month, year. 

If the Value of the control is not explicitly set, the DateTime.Now value is used. After the change of the Value through the UI, the currently selected DateTime will be copied based on the changed segment (day, month or year) along with its time part (ex: 4:46PM). In that case, you may not be able to select the last value assigned to MaxValue of the control, because the value change behavior is not very obvious. 

For example: the user can set MaxValue to 29 Nov 2022 12:00:00AM, and the current value can be 22 Nov 2022 4:49:23PM. The time value is not visible. If you open the drop down with the segments, you will won't be able to select 29 Nov, because that would mean that you will select 29 Nov at 4:49:32PM, which has a bigger value then the explicitly assigned MaxValue which is the 29 Nov, but 12:00:00AM.

Add an API that allows you to skip the time part when comparing dates, and use only the Date of the DateTime objects.