Announcement

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

    DateRangeItem question or most likely enhancement

    Hi Isomorphic,

    I'm under current 4.1p and am using a DateRangeItem with two indented rows showing
    "From: INPUT-BOX PICKER"
    "To: INPUT-BOX PICKER"

    Basically like the DateRangeItem from this showcase sample, but not with relative dates.

    As the two rows itself are not that wide and my whole form is, I was looking for a way to arrange the fields next to each other like "FROM TO" instead of above each other. I did not succeed, though. Is is supported? If not, it might be a good and easy enhancement.

    I made a mockup for this and attached it.

    Best regards,
    Blama
    Attached Files

    #2
    You should actually be able to do this now by manipulating the "dateRangeForm" AutoChild of DateRangeItem to set different numCols.

    We definitely wouldn't recommend doing this when relative dates are being edited, as RelativeDateItem controls change width drastically as you switch between different modes, but it might be an OK alternative layout for entering two absolute dates.

    Comment


      #3
      Hi Isomorphic,

      thanks for the suggestion and the hint on relative item width. I do not use relative items so far, so I thought I could set it inside of my load_skin.js like the following:
      Code:
              if (isc.DateRangeItem) {
                  isc.DateRangeItem.changeDefaults("pickerIconDefaults", {
                      src: "[SKIN]/LT/action/calendar.png"
                  });
                  isc.DateRangeItem.changeDefaults("dateRangeForm", {
                      numCols: 6
                  });
              }
      This did not work (no change). Is it supposed to?
      I did not find the string "dateRangeForm" in the Javadocs. Also, "AutoChild" appears only under getFromField() and getToField().

      Best regards,
      Blama

      Comment


        #4
        We'll check on why "dateRangeForm" isn't appearing in the SGWT docs. It is a documented AutoChild.

        As far as setting numCols, as it turns out this won't work because the DateRangeItem has internal code to set the numCols automatically based on the titleOrientation.

        We'll look at making it possible to make this control side-by-side for 5.1, however, bear in mind that aside from being bad with relative dates, it's probably also not a setting you should use for mobile devices (at least phone/handset form factor).

        Comment


          #5
          We've added a new attribute, DateRangeItem.fieldLayout, which you can set to "horizontal". Please retest with a build dated January 20 or later.

          We'll update later on the visibility of the dateRangeForm autoChild.

          Comment


            #6
            We've exposed DateRangeItem.dateRangeForm in builds dated January 20 and later.

            Comment


              #7
              Hi Isomorphic,

              thanks for adding setFieldLayout(). I'll try it as soon as I switch to 5.1.

              I also saw the getDateRangeForm()-with its AutoChild-text, thanks for that.

              Regarding setFieldLayout(): Is this also configurable from load_skin.js or as AutoChild (I suppose, no), or with setDefaultProperties() (I suppose, yes).

              Best regards,
              Blama

              Comment


                #8
                Yes, the new fieldLayout property behaves like other properties.

                Comment

                Working...
                X