Announcement

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

    DateChooser width, draw issues in SmartClient V9.1 2014-07-06 PowerEdition

    Since upgrading to v9.1 I am not able to resize the width of the datechooser component.
    Previously I was using this code to increase the width of the dateChooser
    Code:
    isc.DateChooser.addProperties({width:"200",dayNameLength:"6"});
    since the upgrade this properties has no effect on the component.

    Also I have a strange behavior in dateChooser. If I restart the application server and started my application and tried to edit any date field

    Code:
     {name:"fromDate", title:"From Date: ", type: "date"}
    the calendar appears and suddenly disappear. Amy idea why is this happening?

    #2
    We're not reproducing either of these locally.

    On the first question - both attributes should be passing numbers, not strings - but, we find that setting width as you do in your sample works as expected, whether we pass numbers or strings. Perhaps you're setting it too late. If you want to show a simple test case that fails as you describe, we can look deeper.

    On your second point, we've no idea from the info you provided - for instance, is this formItem in a DynamicForm? A ListGrid? How are you trying to edit it? Single click?

    We suggest a simple test-case that demonstrates both of these issues, along with steps to reproduce.

    Comment


      #3
      Test case 1 - Calendar Width Issue

      As requested, I made a showcase for calendar width problem.

      Code:
      isc.DateChooser.addProperties({width:300,dayNameLength:6});
      
      isc.DynamicForm.create({
          ID: "dateForm",
          numCols: 4,    
          width: 600,
          fields: [
              {name:"directInputDate", title:"Direct Input Date", type:"date", useTextField:true, change:"dateLabel.setContents(value)", defaultValue:" 12/06/2014 "}
          ]
      });
      
      isc.Label.create({
              ID: "dateLabel",
              top: 40,
              left: 100,
              width: 400
      });
      
      dateLabel.setContents(dateForm.getValue('pickListDate'));
      I only need to make the calendar wider to display the week names properly and we managed through the width previously to make the calendar wider but after this release we can't anymore.

      AS: IBM WebSphere Application Server Version 8.5.5
      Browser: IE9
      Attached Files
      Last edited by Abdulaziz A. ; 31 Aug 2014, 20:14.

      Comment


        #4
        You didn't mention which build you're using for the latest testing - that's always required info.

        DateItem sets an internal default width for it's picker, which overrides the global default set on DateChooser itself - so you just need to add this code:

        Code:
        isc.DateItem.addProperties({ pickerProperties: { width:300 } });

        Comment


          #5
          In fact, use isc.DateItem.changeDefaults("pickerDefaults", {}) rather than addProperties(), so that any later use of pickerProperties in your application doesn't clobber the global width you want.

          Comment


            #6
            Currently I am using SmartClient_v91p_2014-11-22_PowerEdition


            I used the below two statement to expand the width of the dateChooser and both worked well in the forms and girds as well. check the expanded width in attachement1
            Code:
            isc.DateItem.changeDefaults("pickerDefaults", {width:300});
            
            Or
            
            isc.DateItem.addProperties({ pickerProperties: { width:300 } });

            But currently I am not able to expand the width of the DateChooser that comes with the DateRangeItem while filtering the date column in the grid, check attachement2. I tried the below code but it didn't work
            Code:
            isc.DateRangeItem.addProperties({ pickerProperties: { width:300 } });

            Can you help in that.
            Attached Files

            Comment


              #7
              any comments ? is the issue clear ?

              Comment


                #8
                Firstly, to change global settings, you use addProperties() for normal attributes and changeDefaults() for attributes which are themselves properties blocks. So, you would need changeDefaults() in this case.

                Secondly, when overriding the attributes of AutoChildren, [autoChildName]Properties is the right attribute to affect. Setting [autoChildName]Defaults is almost never the right thing to do, unless you're building a custom class.

                Finally, the "picker" that you're trying to set the width of is actually an isc.DateChooser. If you want to set the global width of DateChoosers, you can do that like this:

                Code:
                isc.DateChooser.addProperties({ width: 300 });
                Last edited by Isomorphic; 15 Dec 2014, 02:04.

                Comment


                  #9
                  Hi,

                  isc.DateChooser.addProperties({ width: 300 }); is not working

                  Go to the example https://www.smartclient.com/#dateRangeFilter and apply it and you will see it will not make any difference

                  In the example I changed editorType: "DateRangeItem" to editorType: "DateItem" in the below line of code and applied isc.DateItem.addProperties({ pickerProperties: { width:300 } }); which gave the expected results just for the field but not for the filter editor but applying isc.DateChooser.addProperties({ width: 300 }); is not giving any results neither to the field nor the filter editor

                  Code:
                  { name: "independence", editorType: "DateRangeItem", showTitle: false, allowRelativeDates: true },

                  Comment


                    #10
                    Ok - we'll take a look at why this isn't working directly on DateChooser.

                    In the meantime, this should work:

                    Code:
                    isc.DateItem.changeDefaults("pickerProperties", { width: 300 });
                    isc.RelativeDateItem.changeDefaults("pickerProperties", { width: 300 });

                    Comment


                      #11
                      Setting the global width of all DateChoosers via isc.DateChooser.addProperties(), as previously described, has been fixed for builds dated December 17 and later.

                      Comment

                      Working...
                      X