Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Is there any reason you're not just using form.setSaveOnEnter(true) and item.setValidateOnExit(true)?

    Comment


      #17
      I explained myself incorrectly: I am not trying to "save" the date with the ENTER key, but to do something completely different with the date. So I have to catch it and do something with it.
      If I use the methods you say, where should I catch the value when trying to save? And the form is unbound, I would get warnings ..
      But I think the testcase should work, entering "12" and validating shouldn't return true or ?

      Comment


        #18
        The value of a DateItem is not stored until the item blurs, because a partially typed date value will almost always be invalid.

        Just blur()ing your item before you validate it should work.

        Or, marking the field as required: true should also make your posted code work as you expect.

        Comment

        Working...
        X