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
910
Help with Masking on XamDateTimeEditor
posted

Hey Everyone,

Im using the XamDateTimeEditor, and it bound to a DateTime property on my data object.

However, my app support the user working with just a Date and a Date Time.  ( 01/01/2008 or 01/01/2008 01:20 PM ).

If the user enters 01/01/2008, I want the control to just display that when the user tabs out.  However if the user enters 01/01/2004 02:30 PM, I want it to display that.

When the control goes into edit mode, I want it to always display Date and Time Mask. 

Currently when the control is setup to display date time, it forces it to always show date time.

Is there anyway I can configure or code the control to do what Im asking ?

 Snippet of my xaml.

 <igEditors:XamDateTimeEditor MinWidth="125"
                                             Margin="5,5,5,5"
                                             x:Name="StartDateTimeEditor"
                                             DisplayMode="IncludeBoth"
                                             Mask="mm/dd/yyyy {time}"
                                             BorderBrush="{Binding ElementName=CalendarComboBox,Path=BorderBrush}"
                                             InvalidValueBehavior="RetainValue"
                                             DataMode="IncludeLiteralsWithPadding"
                                             
                                             >
                    <igEditors:XamDateTimeEditor.Text>
                        <Binding Path="StartDate" UpdateSourceTrigger="LostFocus">
                            <Binding.ValidationRules>
                                <validation:PlanAnalysisDateValidationRule/>
                            </Binding.ValidationRules>
                        </Binding>
                    </igEditors:XamDateTimeEditor.Text>
                    
                </igEditors:XamDateTimeEditor>

 

Thanks

Allen