Good afternoon.
Is there a way to format the UltraDateTimeEditor to only show a month/day within an Infragistics Grid? The user's don't want to see the year when choosing a range. For example: 01/01 to 12/31.
The value underneath can include the year but the visual month/day must not include the year. The code below works fine for my purposes for all dates until you test a leap year. The result is 12/29 and the grid / editor continues to throw errors for the invalid date since there is no year associated. Is there a way to supress the error or change the format as I have described above?
I have used this code to achieve the results:
string userDateFormat = GetUserDateFormat();string userDateFormatNoYear = userDateFormat.Replace("/yyyy", "");
// Start Daterow.Cells[START_DATE].Column.Format = "";uiDayMonthEditor.MaskInput = userDateFormatNoYear.ToLower();uiDayMonthEditor.FormatString = userDateFormatNoYear;row.Cells[START_DATE].EditorControl = uiDayMonthEditor;row.Cells[START_DATE].Column.UseEditorMaskSettings = true;
- Christopher
Hello Christopher,
this.ultraDateTimeEditor1.MaskInput = "mm/dd"; this.ultraDateTimeEditor1.FormatString = "mm/dd";
Please let me know if I misunderstood the problem.
Elizabeth AlbertLocalization Engineer