1. #91
    Ext User
    Join Date
    Oct 2007
    Posts
    24
    Vote Rating
    0
    aacraig is on a distinguished road

      0  

    Default


    Quote Originally Posted by wm003 View Post
    it seems, datepickerplus has not been rendered when seteventdates is called. (thus the update-method is not called internally) or the submitted aDates do not contain valid Dateobjects...

    You my try to explicity render the datepicker before calling the jsonstore at all and/or post your response-jsonstring here, so i can test the general setEventDates function more deeply.
    I've put together a little test scenario to illustrate the problem. As you can see, I've taken out the eventDates object in the config altogether, and am simply calling setEventDates when a button is clicked on the form.

    You can uncomment the eventDates entry in the config to see that passing the same aDates array to the config object works just fine. However, passing them to setEventDates does not seem to work.


    Code:
    <div id="form-container"></div>
    
    <script>
    Ext.QuickTips.init();
    var aDates =
      [{
      date: new Date(2008, 4, 5),
      text: "date 1",
      cls:  "x-datepickerplus-eventdates"
      },
      {
      date: new Date(2008, 4, 6),
      text: "date 2",
      cls:  "x-datepickerplus-eventdates"
      },
      {
      date: new Date(2008, 4, 7),
      text: "date 3",
      cls:  "x-datepickerplus-eventdates"
      }];
    
    
    var dpk = new Ext.ux.DatePickerPlus
      ({
      value:            new Date(), 
      noOfMonth:        1,
      noOfMonthPerRow:  1/*,
      eventDates: function(nYear)
        {
        return aDates;
        }*/
      });
    
    var frm = new Ext.form.FormPanel
      ({
      title:      'My Form',
      autoHeight: true,
      items:
        [dpk],
      buttons:
        [{
        text: 'set dates',
        handler: function()
          {
          dpk.setEventDates(aDates);
          }
        }]
      });
    
    frm.render("form-container");
    </script>

  2. #92
    Ext User
    Join Date
    Oct 2007
    Posts
    26
    Vote Rating
    0
    jo2008 is on a distinguished road

      0  

    Default


    Is it possible to select a time period stretching over several months using the Shift key in the Datemenu?

    I found it was not working on the demo page (e.g. select April 2nd --> May 5th)

    If it's not a bug because it's not a feature, do you intend on extending the functionality in order to allow selections stretching over several months with a single-month calendar like in the DateMenu?


    Thanks for the great work,
    Jochen

    [Ext 2.0.2 SVN]

  3. #93
    Ext User
    Join Date
    Oct 2007
    Posts
    1
    Vote Rating
    0
    lpfLoveExt is on a distinguished road

      0  

    Question A possible bug in method "onRender"

    A possible bug in method "onRender"


    Well,at the end of the method "onRender",there is the code:
    "this.preSelectedDates = this.selectedDates;"
    since Array is Object,after running of the code above,this.preSelectedDates points to the same Array of this.selectedDates,you bet it!
    Then turn to the method "setSelectedDates",in the circle below:
    for (var i=0,il=dates.length;i<il;i++) {
    d = dates[i];
    dt = d.clearTime().getTime();
    if (this.preSelectedDates.indexOf(dt)==-1) {
    this.preSelectedDates.push(dt);
    this.selectedDates.push(d);

    }
    }

    once runned,the two expressions in purple will push two different values to the same Array!
    I think it's a bug.Appreciate your reply!

  4. #94
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    890
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by lpfLoveExt View Post
    I think it's a bug.Appreciate your reply!
    Yep, you are so right....i need to do a correct cloning of the selectedDates array in onRender.

    I'll update the code asap. Thanks for reporting!

  5. #95
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    890
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by jo2008 View Post
    Is it possible to select a time period stretching over several months using the Shift key in the Datemenu?

    I found it was not working on the demo page (e.g. select April 2nd --> May 5th)

    If it's not a bug because it's not a feature, do you intend on extending the functionality in order to allow selections stretching over several months with a single-month calendar like in the DateMenu?
    Currently this is only possible for months that are also displayed at once (so your example works on the fixedbig picker on the right of the demopage), but i think your suggestion is a useful feature and i'll try to add it in the next update. Thanks for suggestion.

  6. #96
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    890
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by aacraig View Post
    I've put together a little test scenario to illustrate the problem. As you can see, I've taken out the eventDates object in the config altogether, and am simply calling setEventDates when a button is clicked on the form.

    You can uncomment the eventDates entry in the config to see that passing the same aDates array to the config object works just fine. However, passing them to setEventDates does not seem to work.
    Ok, I found the bug and fixed it. Thanks for the bugreport. I will upload a new version tomorrow (well, thats in a few hours (not counting sleep...(what is sleep?)) anyway.

  7. #97
    Ext User
    Join Date
    Oct 2007
    Posts
    24
    Vote Rating
    0
    aacraig is on a distinguished road

      0  

    Default


    Quote Originally Posted by wm003 View Post
    Ok, I found the bug and fixed it. Thanks for the bugreport. I will upload a new version tomorrow (well, thats in a few hours (not counting sleep...(what is sleep?)) anyway.


    Did the new code get uploaded? I downloaded the zip from the first post, but I still get the same error as before

  8. #98
    Sencha User
    Join Date
    Apr 2008
    Posts
    9
    Vote Rating
    0
    WhiteRussian is on a distinguished road

      0  

    Default


    Hi wm003!

    cool component, thanx!
    I found something like a bug or feature Could you consult me?

    I use DatePickerPlus with following code
    Code:
    var dpp = new Ext.ux.DatePickerPlus({
                    usePickerPlus: true,
    		noOfMonth: 1,
                    multiSelection: true,
                    startDay: 1
                });
    All OK, the calendar renders with Monday as first date of week, weeks selection works. When I select one week (for example 20, in month May), it selects all days in range from 12 to 18 May (its right!), BUT when I click next month and back to May the selection changed to the from 18 to 24 May. Its wrong for startDay =1 (but right for stratDay=0).

    what can I do?

  9. #99
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    890
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by aacraig View Post


    Did the new code get uploaded? I downloaded the zip from the first post, but I still get the same error as before
    yo, i haven't uploaded yet, because i'm implementing a few new requested features and need to test them a bit more...please stay tuned, i try to upload the code asap

  10. #100
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    890
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by WhiteRussian View Post
    All OK, the calendar renders with Monday as first date of week, weeks selection works. When I select one week (for example 20, in month May), it selects all days in range from 12 to 18 May (its right!), BUT when I click next month and back to May the selection changed to the from 18 to 24 May. Its wrong for startDay =1 (but right for stratDay=0).
    Thanks for reporting this. It's in fact a doublebug. the getFirstDateOfWeek and some calls to it was incorrect. I will upload a corrected version together with several other reported fixes and requested feature hopefully until tomorrow.

Thread Participants: 111

  1. galdaka (1 Post)
  2. wehtam (5 Posts)
  3. nassaja-rus (1 Post)
  4. mystix (5 Posts)
  5. ludoo (1 Post)
  6. jsakalos (1 Post)
  7. laluigino (2 Posts)
  8. evant (1 Post)
  9. methodz (1 Post)
  10. stevebla (1 Post)
  11. netnoise (1 Post)
  12. KampfCaspar (1 Post)
  13. carstep (2 Posts)
  14. ZooKeeper (1 Post)
  15. nromanel (6 Posts)
  16. Spirit (1 Post)
  17. yuewah (4 Posts)
  18. chemist458 (3 Posts)
  19. jerrybrown5 (3 Posts)
  20. gtomalesky (5 Posts)
  21. jo2008 (1 Post)
  22. aacraig (7 Posts)
  23. stumpy_uk (2 Posts)
  24. hattia (3 Posts)
  25. lpfLoveExt (1 Post)
  26. thoreking (3 Posts)
  27. markusreimers (1 Post)
  28. sigaref (2 Posts)
  29. andreabat (1 Post)
  30. sanjshah (6 Posts)
  31. mask_hot (4 Posts)
  32. dorgan (1 Post)
  33. bornsilly (1 Post)
  34. Zord (3 Posts)
  35. aaronchiang (1 Post)
  36. skbach (5 Posts)
  37. joenilson (2 Posts)
  38. S1-Gezi (1 Post)
  39. pcsernyik (6 Posts)
  40. vizcano (1 Post)
  41. Richie1985 (2 Posts)
  42. radtad (6 Posts)
  43. tagsum (3 Posts)
  44. Nohcs777 (5 Posts)
  45. lavitsky (1 Post)
  46. Hunyi (1 Post)
  47. brenda (3 Posts)
  48. hp (2 Posts)
  49. Dave.Sanders (4 Posts)
  50. DVSDevise (3 Posts)
  51. moegal (3 Posts)
  52. EzBulka (1 Post)
  53. catapl3xis (2 Posts)
  54. rvrdesigns (2 Posts)
  55. rich02818 (5 Posts)
  56. armandoxxx (2 Posts)
  57. WhiteRussian (4 Posts)
  58. lacco (1 Post)
  59. Ronhead (3 Posts)
  60. Urkman (1 Post)
  61. descheret (3 Posts)
  62. dimitrij.zub (1 Post)
  63. hirenb (1 Post)
  64. sasho (7 Posts)
  65. CR_RedFox (1 Post)
  66. joshuabco (1 Post)
  67. apimio (4 Posts)
  68. sirtimbly (2 Posts)
  69. canxss (2 Posts)
  70. SimoAmi (2 Posts)
  71. wemerson.januario (1 Post)
  72. dubdub (3 Posts)
  73. Naokai (5 Posts)
  74. RuiDC (4 Posts)
  75. dkarlsso (1 Post)
  76. slisbin (1 Post)
  77. Chods (2 Posts)
  78. dkroells (3 Posts)
  79. alvaro1728 (1 Post)
  80. sneema (15 Posts)
  81. AdamLShepherd (2 Posts)
  82. bholyoak (2 Posts)
  83. dtex-lab (1 Post)
  84. EZboy (2 Posts)
  85. burbur (1 Post)
  86. strad84 (2 Posts)
  87. radubrehar (4 Posts)
  88. almotasim (2 Posts)
  89. itheart (1 Post)
  90. fmntf (4 Posts)
  91. Allbus (2 Posts)
  92. sprakash (2 Posts)
  93. sansie (3 Posts)
  94. siebe vos (6 Posts)
  95. gkarmadi (1 Post)
  96. fabads (16 Posts)
  97. kskrumpet (4 Posts)
  98. sivanesan (1 Post)
  99. marco81 (1 Post)
  100. Lobo (2 Posts)
  101. benoitrx (1 Post)
  102. JazzMan88 (3 Posts)
  103. Urzzza (1 Post)
  104. josefhaydn (2 Posts)
  105. eja40 (3 Posts)
  106. lukasw44 (1 Post)
  107. thchuong (1 Post)
  108. twhra (1 Post)
  109. ronei (1 Post)
  110. qdano (1 Post)
  111. quintenvk (1 Post)

Tags for this Thread