Announcement

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

    MiniDateRangeItem and validation

    SmartClient Version: v13.1p_2025-02-07/AllModules Development Only (built 2025-02-07)

    Hello, I'm trying out the MiniDateRangeItem, but I'm unsure about its validation behaviour.
    1. If I select a valid range and call validate() on the form, the validation fails with the message "must be a date".
    2. If I call validate() on the form item, it returns true for both valid and invalid ranges (e.g., from tomorrow to yesterday).
    3. With autoValidate: true, I expected that selecting an invalid range wouldn't even be possible.
    Could you clarify how validation is supposed to work for the MiniDateRangeItem?

    Code:
    isc.DynamicForm.create({
        ID: "dateForm",
        width: 620,
        colWidths: [190, "*"],
        fields : [
        {
            name: "mdri", title: "Mini Date Range", autoValidate:true,
            editorType: "MiniDateRangeItem"
        }
        ]
    });

    #2
    hi Claudio - MDRI doesn't produce a date, so it shouldn't have a date-validator. This was a recent regression caused by some logic being moved from MDRI to DateRangeItem, to fix the same issue there, but the logic is required in both classes. It's been reinstated in MDRI for today's builds, dated February 11, and later ones.

    Comment


      #3
      SmartClient Version: v13.1p_2025-02-11/AllModules Development Only (built 2025-02-11)

      Hello, I see the fix for point #1, thanks.

      About #3, maybe it's just meant to validate the two individual values, rather than the date range?

      Comment


        #4
        hi Claudio - your point 3 is correct - we've fixed so that range-validation fails if the toDate is before the fromDate - the toDate field gets the error and shows the invalidRangeErrorMessage as expected.

        Please retest with a build dated February 19 or later.

        Comment

        Working...
        X