Hi,
We have an issue with XamDatetimeEditor which automatically being set to 2029 when a user enter just 2 -digit in the year. But if the user enters 30 it is getting set to 1930 on lose focus.
I would like to know if there is any way where we could set if any 2-digit year is entered and tabbed out it should auto populate to years in 2000 instead of 1900.
or
Is there any way we could set user to enter all four digit in the year and not autofill it.
Appreciate any help.
Thanks
Hello,
Excuse me for the late reply. In order to achieve this you can set the ComboBoxStyle like so:
<igEditors:XamComboEditor IsEditable="True"
Name="xamComboEditor3"
Width="100"
HorizontalAlignment="Center"
VerticalAlignment="Top" >
<igEditors:XamComboEditor.ComboBoxStyle>
<Style TargetType="{x:Type ComboBox}" >
<Setter Property="IsTextSearchEnabled" Value="False" />
</Style>
</igEditors:XamComboEditor.ComboBoxStyle>
</igEditors:XamComboEditor>
Hope this helps.
How to switch off this autofill functionality?
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Sincerely,DimiDeveloper Support Engineer, MCPD Infragistics, Inc.www.infragistics.com/support
gneeraj said: We have an issue with XamDatetimeEditor which automatically being set to 2029 when a user enter just 2 -digit in the year. But if the user enters 30 it is getting set to 1930 on lose focus. I would like to know if there is any way where we could set if any 2-digit year is entered and tabbed out it should auto populate to years in 2000 instead of 1900.
We are simply using the ToFourDigitYear method of the System.Globalization.Calendar associated with the culture the editor is using. That culture comes from either the FormatProvider if it is set and if not then from the Culture based on the FrameworkElement.Language property. So you cannot directly manipulate the conversion but you can provide a different cultureinfo where the calendar's tofourdigityear is handled differently or the twodigityearmax property is set such that it results in the value you want.
gneeraj said: Is there any way we could set user to enter all four digit in the year and not autofill it.