When I set the minimum date on Calendar Info to 01/01/0001 it blanks out the minimum date on calendar info. I can live with that but when the value is set to the ultraCalendarCombo it displays 01/01/0001. That is also fine but once that value is set the date drop down will not display anything. Even if the user types in a valid date the calendar drop down has a big red X in it. I have Allow Null set to true but that is the default. I leave cause validation because the date is valid and falls with in the range.
If I do not use calendar info and just let the control handle a null it will not allow 01/01/0001 to be set. It immediately sets itself to today and the user has to blank out the date. Blanking out or setting the date to null is fine but the user should not have to perform this step just to clear the date.
I am not sure if there is a better way to handle a date with the value of 01/01/0001 but this is necessary because many licenses do not have expiration dates and by setting them to 01/01/0001 our code will not check to see if the license has expired.
Thanks.
Hello Michael,
Thank you for the reply.
As far as I understood from the description of your issue you are using 01/01/0001 for a licenses with no expiration dates. As they do not have such date the logical approach would be the value of this field to be null. In this case you will be able to use the approach which I’ve described in my post from 7 of April 2014. Could you please let me know why this doesn’t match your requirements?
The calendar combo does indeed show dates before 1753. As I have mentioned in my previous post, the earliest date it can show properly is 01/01/0002. It can’t show 01/01/0001, because the DateTime type does not support dates before 01/01/0001 and it will not be possible for the calendar to show the dates from the previous month (they would be BC dates). So if you have to use a date for licenses without expiration you could use another date like 01/01/0002.
Please let me know if you have any additional questions.
In the first post I had already changed the MinDate in UltraCalendarInfo to be 01/01/0001. This simply sets the MinDate to blank or null. When choosing to go with UltraCalendarCombo I used this response from another post where the user wanted to set the date to less than 1753.
http://es.infragistics.com/community/forums/t/66846.aspx
Thank you for contacting Infragistics Developer Support.
Minimum Date value for UltraCalendraInfo is 1/1/1753, that is why you are not able to assign date smaller than this date to UltraCalendarCombo (if you do not explicitly set CalendarInfo to it will use its default value)
Generally setting the date of a calendar to something before 1/1/1753 is not recommended, simply because in WinForms MonthCalendar control that is the minimum date. The minimum date that you are able to show with UltraCalendarCombo is 01/01/0002.
What you could do in your scenario is to set the value to null and set the NullDateLabel property of the CalendarCombo to a value of your linking. To do this you can use the following code snipped:
ultraCalendarCombo1.NullDateLabel = "No Expiration Date";
ultraCalendarCombo1.Value = null;
Please let me know if this is what you are looking for.
I am looking forward to your response.