Hello,
I have a xamDateTimeEditor which I would like to limit to year entry only. The xaml I used is below
<igEditors:XamDateTimeEditor Name="editor" Mask="yyyy" Format="yyyy"
MaxWidth="80" MinWidth="80"
IsAlwaysInEditMode="False" DisplayMode="IncludeBoth"
Height="23" VerticalAlignment="Center"
DropDownButtonDisplayMode="Always" AlwaysValidate="True"
AllowDropDown="True"">
however this causes the drop down for the XamMonthCalendar to be hidden, and when I go into edit mode the display changed from 2010 to yyyy.
I have also tried to apply the following style to no avail.
<Style TargetType="{x:Type igEditors:XamMonthCalendar}">
<Setter Property="TodayButtonVisibility" Value="Collapsed" />
<Setter Property="MinCalendarMode" Value="Years" />
<Setter Property="CurrentCalendarMode" Value="Years" />
</Style>
Is there a way to constrain the XamDateTimeEditor and its XamMonthCalendar to year selection only?
Thanks
It's certainly a reasonable request especially given that our month calendar supports specifying a minimum calendar mode so it could support selection of a year. I was mainly trying to establish if we had inadvertantly introduced a breaking change. I'll make sure there is a feature request submitted for this.
I think you are correct. I reverted my dlls to version 2009.2 believing that yyyy was interpreted as a year section in that version, but it is not. Sorry for the confusion. This would be nice to have though as it works for date/time, date, and month( "{date} {time}";"{date}";"{LOC}mm/yyyy") and I have a scenario where we allow the user to select a date, a week, a month, a quarter, a year and I have to switch between comboboxes and the xamdatetime editor for selection depending on the calendar level they are using. It would be nice to keep it uniform. Extending this to year doesn't seem like too much of a stretch. Thanks for the quick response.
Shane
Can you clarify what was working? Can you provide a sample that was working for you and indicate what version of the assemblies you were using? To my knowledge a series of "yyyy" characters alone (which is what this thread was talking about) has never been interpretted as a year section and at least in the initial implementation a dropdown was never shown unless there was date sections displayed..Recently that was relaxed such that we would allow the dropdown to be shown as long as the mask didn't contain time only sections.
Is this going anywhere as a feature request? This actually worked in the previous version of the XamDateTimeEditor. I just upgraded to the latest release(10.3) i believe and it no longer works.
Thanks. I put in a feature request as you suggested.