Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
96
XamDateTimeEditor yyyy mask
posted

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