Announcement

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

    DateItem - setEmptyDisplayValue

    Hi,
    I have a form with DateItem and I need to display text like "No date specified" when no date is selected. I tried to use item.setEmptyDisplayValue("No date specified") but it did not work. (It worked only for text items.)

    I also tried this code in onChange():
    Code:
     if(item.getValue() == null) item.setValue("No date specified")
    This works, but the date validator has a problem with it. It shows warning "Please enter a date with the following format".

    Is there some elegant solution for this problem?

    #2
    The next nightly should have a fix for this issue. However, also in the next nightly is support for using a hint in the field:
    Code:
    hint: 'No date specified', showHintInField: true

    Comment


      #3
      Thanks. I'll use the next build. The hint does not work either. It shows the message next to the dateItem component (not inside it) and it stays there even if the date is filled in.

      Comment


        #4
        If you have pulled an updated build and still have problems, please post a full standalone test case.

        Comment

        Working...
        X