Announcement

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

    How to Extend DateRangeItem From/To DateItem Picker Enddate beyond 12/31/2015.

    How to Extend DateRangeItem From/To DateItem Picker Enddate beyond default date 12/31/2015?

    I have a listgridfield filter as DateRangeItem. After getting DateRangeDialog the From/To DateItem Picker enddate is default (12/31/2015). How could I extend those enddate beyond the default date?
    Thanks in advance.

    #2
    Hi royding,

    see DateChooser.setEndYear():
    Code:
    DateChooser dc = new DateChooser();
    dc.setEndYear(2020);
    DateChooser.setDefaultProperties(dc);
    Best regards,
    Blama

    Comment


      #3
      how to retrieve from/to dateitem from daterangeitem

      Thanks Blama for the replying. i need to retrieve from/to dateitem object from daterangeitem. so i can setEndDate to both of from/to dateitems in the daterangeitem to the date beyond default date 12/31/2015 but i did not find the ways to do that.

      If i can get the from/to dateitem form daterangeitem so i can

      Calendar endYear = Calendar.getInstance();
      endYear.add(Calendar.YEAR, 100);
      dateitem.setEndDate(endYear.getTime());

      Anyone has any idea that i can extend daterangeitem's from/to date chooser enddate beyond default date 12/31/2015.

      thanks in advance.

      Comment


        #4
        Hi royding,

        see DateRangeItem.getFromField().

        I think a cast and then changing your property should work. Although you would have to do it every time you open a DateRangeItem. Better approach is to use AutoChild mechanism and to change it permanently or to do it in your load_skin.js.

        Best regards,
        Blama

        Comment


          #5
          listgridfiled date datatype date chooser enddate extension

          Thank you very much Blama. I think i did not explain my problem correctly.

          What i need to solve is the following:

          1. I have a listgrid.
          2. one listgridfield column is date datatype.
          3. this listgridfield column is filterable with a filter on top.
          4. when clicking on the filter datepick icon the Select Date Range dialog popup.
          5. then you can pick the from date and to date to filter the listgrid.
          6. the problem is when you try to pick the from/to date the date pick enddate is 12/31/2015 which is the default. so if i want to pick the date after 12/31/2015 i have no way to do it.
          7. so how could i setEndDate to the from/to dateitem to extend the enddate beyond the default date 12/31/2015.

          I attached the imgs for the references.

          Thank in advance.

          Roy
          Attached Files

          Comment


            #6
            Hi royding,

            I'm pretty sure that for the mini-calender (DateChooser is the classname) my post #2 applies.
            For also disallowing (not allowing, so you might not need this) manually entered date outside of a given range, I think my post #4 applies.

            Try #2 first (really only 3 lines of code), then #4. If both don't work, Isomorphic will have to jump in.

            Best regards,
            Blama

            Comment


              #7
              how to extend miniDaterengeItem from/to enddate

              Hi Blama,

              Thank you for the reply. I think what i really need to do is:

              1. default listgridfield filterEditor for datetype is a miniDateRangeItem which has the default enddate for From/To datechooser (12/31/2015).
              2. i need to make the miniDateRangeItem's from/to datechooser enddate beyond default enddate then set this modified miniDateRangeItem as the listgridfield filterEditorType.
              3. I did not find anyway to do that yet.
              4. for the DateRangeItem i did see what you said DateRangeItem.getFromField() in the api document but somehow it is not available from my code. i think it is not in our version.

              I really need to find a way to solve the problem. How could i get Isomorphic attention to help me?

              Thank you Blama very much.

              Roy

              Comment


                #8
                Hi Roy,

                I don't know when or if Isomorphic will reply, but the chances are better if you include the relevant information, e.g. your version plus build date.

                The javadocs I linked are for 5.0d, but the APIs are there in 4.1p as well (just remove the "-latest" in the URL to see them).

                Best regards,
                Blama

                Comment

                Working...
                X