Announcement

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

    Year list in datechooser

    Hi, Isomorphic.

    Is there a way of increasing the list of years obtained by clicking on the year in the datechooser header so that it contains more than 21 years? My users need this to be able to pick years for persons birthdate like 60, 70 or more years back.

    Thanks in advance.

    #2
    The year list based on the configured startDate and endDate, so set an earlier startDate.

    Comment


      #3
      Tried it, but id doesn't seem to be working... here's the code:
      Code:
      	var d = new Date(1900, 0, 1);
      	dtpDiagDateR.startDate = d;
      	dtpDiagDateR.endDate = new Date();
      where dtpDiagDateR is a DateItem control. But when I open the year list I still get years from 1990 to 2010

      Comment


        #4
        Either add this line after the code you just posted

        Code:
            dtpDiagDateR.setItems()
        or specify startDate and endDate in your field definition, like

        Code:
        { name: "myDate", type: "DateItem", startDate: new Date(1900, 0, 1), endDate: new Date() }

        Comment


          #5
          Tried both and still nothing...
          See the attachment below
          Attached Files

          Comment


            #6
            We'll take a closer look at this, but the following internal override on your date-field definition should do what you need. Note, however, that this method is undocumented and unsupported, and that the width of the year-chooser widget is currently fixed, so your broad date-range will result in a very tall chooser

            Code:
                        showPicker : function () {
                            this.Super("showPicker", arguments);
                            this.picker.startYear = this.startDate.getFullYear();
                            this.picker.endYear = this.endDate.getFullYear();
                        }

            Comment


              #7
              This did the trick, but the list is farely big...
              Since the width of the list is fixed I suppose the height can not be set to a fixed amount (or max amount for that matter) either, so that the scrollbar appears to aid in displaying more years than the height allows

              Comment


                #8
                Are there any plans in trying to improve the look of year list?
                Like adding a scrollbar to display more years in the same sized window?
                Or at least adjusting the width of the window?

                Comment


                  #9
                  Yes, development tasks have been scheduled

                  Comment


                    #10
                    When can we then roughly expect first results?

                    Comment

                    Working...
                    X