Why move
Existing Infragistics subscriptions can still be renewed, and Ultimate UI for Windows Forms is still being released. What changed is how you get a new license: a new developer on the team, or a new project, now needs a suite license, even when the application uses only a few Windows Forms controls. If those controls are date fields, a tree, a multi-column dropdown, masked fields and tabs, our five .NET controls cover them, sold separately or together. See moving from Infragistics Windows Forms for all five.
What you get
SftDate/NET 3.0 is a date and time picker for Windows Forms, written entirely in C# and shipped as a single assembly.
- A typed value. SftDate.Value is a DateTime?, with no cast and no DBNull, and in .NET 10 the value is also available as DateOnly and TimeOnly.
- Times picked from the dropdown. A time list or a clock face next to the calendar, or on its own for a time field, with the interval you choose.
- Date ranges in one field. A start and an end date, picked in the same calendar, with their own change event.
- A calendar you can set up. Several months, ISO 8601 week numbers, disabled days of the week, special dates (recurring, bold, with a tooltip or an image), year, decade and century views, and Today and Clear buttons.
- Empty values done right. A placeholder text, a clear button or a check box in the field, and a default text such as today's date.
- Entry the way users type. Each part of the date edited on its own with automatic advance, or free-form entry with your own parsing, and a partly typed date completed by the control.
- Every calendar of the culture. Japanese, Hebrew, Hijri and other calendar systems, with the value kept as a Gregorian DateTime.
- Validation that can correct. ValueValidating sees the user's new value and can replace it or cancel it.
- Modern Windows. The same API and Visual Studio designer support in .NET Framework 4.7 (or later) and .NET 10 (or later) applications. Set one property and the field, its dropdown and the calendar follow the Windows light/dark setting. The controls scale with the DPI of the monitor showing them, honor the Windows contrast themes and have built-in UI Automation support for Narrator, NVDA, JAWS and other screen readers, dropdown included.
A license is per developer and royalty-free, sold on its own.
Member mapping
SftDate/NET is not a drop-in replacement: there is no input mask and no Appearance object, and the value is a typed DateTime? instead of an object. Many names will still look familiar. This table shows where each UltraDateTimeEditor member is found, with UltraCalendarCombo's where it differs.
| Task | UltraDateTimeEditor | SftDate/NET 3.0 |
|---|---|---|
| Value | Value (an object), DateTime | SftDate.Value (DateTime?), and in .NET 10 SftDate.DateOnlyValue and SftDate.TimeOnlyValue |
| Empty value | Nullable (UltraCalendarCombo: AllowNull) | SftDate.AllowEmpty, or SftDate.ShowCheckBox with SftDate.Checked |
| Text when empty | NullText, NullTextAppearance (UltraCalendarCombo: NullDateLabel) | SftDate.PlaceholderText, SftDate.PlaceholderForeColor |
| Format | MaskInput for editing, FormatString for display (UltraCalendarCombo: Format) | SftDate.Format and SftDate.CustomFormat, one .NET format for display and editing |
| Editing | PromptChar, MaskDisplayMode, MaskClipMode | SftDate.EditStyle: the parts of the format edited one at a time, or the whole date typed free-form |
| Range | MinDate, MaxDate (UltraCalendarCombo: CalendarInfo.MinDate, MaxDate) | SftDate.MinDate, SftDate.MaxDate |
| Invalid text | IsDateValid, InvalidTextBehavior | Not needed: the value is always a valid date, and text that does not parse is rejected |
| Opening and closing | DropDown, CloseUp (UltraCalendarCombo: DroppedDown) | SftDate.OpenDropDown, SftDate.CloseDropDown, SftDate.DroppedDown |
| Dropdown alignment | DropDownCalendarAlignment (UltraCalendarCombo: DropDownAlignRight) | SftDate.DropDownAlignment (Near, Far) |
| Calendar colors | DropDownAppearance (UltraCalendarCombo: CalendarLook) | SftDate.Calendar (a CalendarClass) with BackColor, ForeColor, TitleBackColor, TitleForeColor, SelectedBackColor, TrailingForeColor, WeekendForeColor and TodayColor |
| First day of the week, holidays | UltraCalendarCombo: CalendarInfo.FirstDayOfWeek, CalendarInfo.Holidays | CalendarClass.FirstDayOfWeek, CalendarClass.SpecialDates |
| Today and none buttons | UltraCalendarCombo: DateButtons | CalendarClass.ShowTodayButton, CalendarClass.ShowClearButton, CalendarClass.TodayText, CalendarClass.ClearText |
| Buttons | DropDownButtonDisplayStyle, SpinButtonDisplayStyle (UltraCalendarCombo: SpinButtonsVisible) | SftDate.Buttons (DropDown, UpDown, DropDownAndUpDown, None) |
| Spinning | SpinIncrement, SpinWrapBehavior | The buttons, the arrow keys and the mouse wheel change the part being edited; days, months and hours wrap within their range |
| Automatic completion | AutoFillDate, AutoFillTime | Built in: a partly typed date is completed by the control |
| Culture | FormatProvider (UltraCalendarCombo: DateTimeFormatInfo) | SftDate.Culture, including the culture's calendar system |
| Colors and borders | Appearance, ButtonAppearance, DisplayStyle, BorderStyle, UseOsThemes | SftDate.BackColor, SftDate.ForeColor, SftDate.BorderStyle, SftDate.BorderColor, SftDate.SegmentHighlightBackColor, SftDate.UseThemes |
| Validation | BeforeExitEditMode (UltraCalendarCombo: ValidationError) | SftDate.ValueValidating, whose NewValue can be changed and which can be canceled |
| Value events | ValueChanged | SftDate.ValueChanged, and SftDate.RangeChanged for a date range |
| Dropdown events | BeforeDropDown, AfterDropDown, AfterCloseUp | SftDate.DropDownOpening, SftDate.DropDownOpened, SftDate.DropDownClosed |
The same field in both
Both examples set up a date field that can be empty, with a text shown while it is empty and a range, and read the value when it changes. With UltraDateTimeEditor:
ultraDateTimeEditor1.Nullable = true;
ultraDateTimeEditor1.NullText = "(no date)";
ultraDateTimeEditor1.MinDate = new DateTime(2020, 1, 1);
ultraDateTimeEditor1.MaxDate = new DateTime(2030, 12, 31);
ultraDateTimeEditor1.ValueChanged += (s, e) => {
DateTime? value = ultraDateTimeEditor1.Value as DateTime?;
labelInfo.Text = value.HasValue ? value.Value.ToString("D") : "No date";
};
With SftDate/NET, which also gets a clear button, a custom format with the time, and a clock face for the time in the dropdown:
sftDate1.AllowEmpty = true;
sftDate1.PlaceholderText = "(no date)";
sftDate1.ShowClearButton = true;
sftDate1.Format = DateFormatEnum.Custom;
sftDate1.CustomFormat = "ddd, MMM d, yyyy HH:mm";
sftDate1.TimeDropDownStyle = TimeDropDownStyleEnum.Clock;
sftDate1.MinDate = new DateTime(2020, 1, 1);
sftDate1.MaxDate = new DateTime(2030, 12, 31);
sftDate1.ValueChanged += (s, e) => {
DateTime? value = sftDate1.Value;
labelInfo.Text = value.HasValue ? value.Value.ToString("D") : "No date";
};
You can also skip most of this code: the field, its calendar and its format are set up in the Visual Studio designer.
Migration notes
- Allow the empty value. Setting SftDate.Value to null needs AllowEmpty or ShowCheckBox; AllowEmpty is off by default, while UltraCalendarCombo allows null by default.
- The format is the mask. One .NET format string replaces MaskInput and FormatString. Its parts (day, month, year, hours, minutes) are what the user edits; with the free-form edit style, your TextParsing handler can read anything the user types.
- Out-of-range dates move to the limit. A typed date outside MinDate and MaxDate becomes the nearest limit, where UltraDateTimeEditor reverts to the last valid date.
- Validation sees the value. ValueValidating is raised for the user's input after the range is applied, with the new value instead of the text.
Before you start
SftDate/NET has no input mask with prompt characters and no read-only state; a date that users may see but not change is shown with Enabled set to false.
Try it
The free trial includes the working controls and the C# and VB.NET samples. Replace one UltraDateTimeEditor in your own forms before you buy. A license is per developer, royalty-free, and includes one year of support and upgrades.
Infragistics, UltraDateTimeEditor and UltraCalendarCombo are trademarks of Infragistics, Inc. Softel vdm is not affiliated with Infragistics.
