Announcement

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

    12.1p DateRangeItem, RelativeDateString and RelativeDateShortcut question

    Hi Isomorphic,

    reading about DateRangeItem, RelativeDateString and RelativeDateShortcut I have a question using this modified sample (v12.1p_2023-06-27):

    Code:
    isc.DynamicForm.create({
        ID: "form1",
        width: 620,
        colWidths: [190, "*"],
        fields: [
        {
            name: "dri", title: "Date Range 1",
            width: 400,
            editorType: "DateRangeItem",
            allowRelativeDates: true,
            fromDate: "-0M[-0M]",
            toDate: "+0M[-0M]"
        },
        {
            name: "dri2", title: "Date Range 2",
            width: 400,
            editorType: "DateRangeItem",
            allowRelativeDates: true,
            fromDate: "$startOfMonth",
            toDate: "$endOfMonth"
        }
        ]
    });
    Click image for larger version  Name:	DateRangeItem.PNG Views:	0 Size:	29.8 KB ID:	270490

    I somehow expected the 2nd DateRangeItem to display the same absolute dates as the 1st DateRangeItem. Is it correct what is displayed?

    Best regards
    Blama

    #2
    RelativeDateShortcuts do work in this way, but only if they are in the picker (that is, in RDI.presetOptions) - the $startOf and $endOf variants do exist, but they're not in the picker by default.

    However - there's still a bug here. In this situation, passing a valid RelativeDateShortcut which is not in the picker, we should have been converting the shortcut to its underlying RelativeDateString, and applying that value to the item. That causes both of your sample items to behave in the same way; they show the absolute date associated with the relative one.

    We've made that change for tomorrow's builds.

    Comment


      #3
      Hi Isomorphic,

      I can see the change here in v13.0p_2023-07-12. Now the display is the same, as expected.
      12.1p does not have new builds, yet.

      Thank you & Best regards
      Blama

      Comment


        #4
        Hi Isomorphic

        using v12.1p_2023-07-13 this is not fixed. Did you also fix it in the 12.1p branch?

        Best regards
        Blama

        Comment


          #5
          No, it hasn't been ported back yet - we'll do that today, for tomorrow's builds.

          Comment


            #6
            The change has been ported to 12.1 and 12.0 - please retest with a build dated July 14 or later.

            Comment


              #7
              Hi Isomorphic,

              I can see this is changed using v12.1p_2023-07-14.

              Thank you & Best regards
              Blama

              Comment

              Working...
              X