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
225
XamMaskedEditor as Editor for TimeSpan doesn't accept more than 24 hours
posted

Hi

I would like to use a XamEditorMask as Editor for a timespan. I used the following code:

<igEditors:XamMaskedEditor ValueType="sys:TimeSpan"

                           Value="{Binding}"

                           Mask="hh:mm:ss"

                           InvalidValueBehavior="RevertValue">

     <igEditors:XamMaskedEditor.ValueConstraint>

        <igEditors:ValueConstraint ValidateAsType="TimeSpan"

 Nullable="False"/>

     </igEditors:XamMaskedEditor.ValueConstraint>

</igEditors:XamMaskedEditor >

 

The problem is now, that I should be able to fill out more than 24h, but the editor doesn’t accept more than this 23:59:59.

What can I do? How is the Input validated exactly?

Best regards

Parents
  • 54937
    Suggested Answer
    Offline posted

    'hh:mm:ss' is a time mask as would be part of a DateTime. The valid hours for time can only be 0-23. If you want to simulate a TimeSpan then you might use a mask like "nn:nn:nn" or "{number:0-99}:{number:0-59}:{number:0-59}" instead.

Reply Children