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
365
How to use Keywords and Custom Entry in XamDateTimeEditor
posted

I would like to allow users to certain keywords like "today" or short "t" or simple calculations like "today + 7 d". In addition the numer of the day in the year should allow to identify the date in a short form. On top of this it should still be possilbe to enter a normal date like XamDateTimeEditor expects it.

How would I go about allowing these custom entries in XamDateTimeEditor?

Parents
  • 54937
    Offline posted

    Data entry is restricted to the characters allowed for the mask. So the intrinsic date and time mask characters (e.g. m, d, y, h) only accept numeric values. The only way to do something like this would be to set a mask that accepts any character (e.g. C) and then handling the parsing to/from string yourself via the ValueToTextConverter. However currently this will not work and still get the dropdown button since the AllowDropdown will be coerced to false if there are no date sections. I'll see about getting a case created for this so we can allow for the dropdown to still show.

Reply Children