1. #821
    Sencha User
    Join Date
    Jun 2011
    Location
    Seattle, WA
    Posts
    6
    Vote Rating
    0
    ithompson is on a distinguished road

      0  

    Default Undeletable post = annoying

    Undeletable post = annoying


    Quote Originally Posted by ithompson View Post
    Is there an Ext JS 4.0 version of this?
    No functionality for the Delete button? Really? =(

  2. #822
    Sencha User
    Join Date
    Nov 2011
    Posts
    7
    Vote Rating
    0
    SSzretter is on a distinguished road

      0  

    Default Uncaught TypeError: Cannot read property 'prototype' of undefined

    Uncaught TypeError: Cannot read property 'prototype' of undefined


    In the constuctor, I am getting a syntax error in Ext JS 4:
    Uncaught TypeError: Cannot read property 'prototype' of undefined


    // }}}
    // {{{
    /**
    * @private
    */
    ,adjustSize:Ext.BoxComponent.prototype.adjustSize


    Why?

    I am including:
    <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
    <script type="text/javascript" src="extjs/ext-all-debug.js"></script>

    Then I pasted the code from page 1 of this thread (up to the line Ext.reg('xdatetime', Ext.ux.form.DateTime)

  3. #823
    Ext JS Premium Member
    Join Date
    Oct 2010
    Location
    Nottingham, UK
    Posts
    7
    Vote Rating
    0
    easley is on a distinguished road

      0  

    Default


    > Then I pasted the code from page 1 of this thread

    That code relates to an earlier version of Ext. BoxComponent is no more in ExtJS4.

    Since this thread is so old and long, you might do better to read it backwards ;-)

  4. #824
    Sencha User maiconschelter's Avatar
    Join Date
    Nov 2008
    Location
    Brazil
    Posts
    15
    Vote Rating
    6
    maiconschelter is on a distinguished road

      0  

    Default


    Found with ExtJS 4.1, tested in FireFox, Chrome and Safari. Not found in Internet Explorer.
    DateTime.zip

  5. #825
    Ext JS Premium Member
    Join Date
    Feb 2011
    Posts
    6
    Vote Rating
    0
    I_Leising is on a distinguished road

      0  

    Default


    Hi,

    if i use the DateTime-Field in a grid it doesnt work correct in the last visible row.error_datetime_picker.jpg

    The user cant select the time

    Does anyone have a solution for this?

    //edit: i use Ext 3.4
    Last edited by I_Leising; 12 Apr 2012 at 7:12 AM. Reason: add ext version

  6. #826
    Sencha User
    Join Date
    Jun 2009
    Location
    Colorado
    Posts
    51
    Vote Rating
    0
    Keylan will become famous soon enough

      0  

    Default


    I have run into the same issue with this field in the last row of a grid, when the timePosition is set to below. It seems like the time field portion shows up inside the grid and gets cut off by the bottom of the grid. Has anyone come up with a solution for this issue (besides changing timePosition to right).

  7. #827
    Sencha User
    Join Date
    May 2012
    Location
    Odessa, Ukraine
    Posts
    1
    Vote Rating
    0
    Deadlock is on a distinguished road

      0  

    Default version for ExtJS 4.1 (release)

    version for ExtJS 4.1 (release)


    I got previously posted version of DateTime picker for ExtJS 4.1 and it doesn't work.
    May be it was tested with RC version, but with my version of ExtJS (4.1 release) it doesn't work.
    I novice in Ext, have a little practice and try to fix it with my knowledge - I got to make it work.
    Who want may diff my changes with previous version and put self correction.
    Attached Files

  8. #828
    Sencha User
    Join Date
    Jan 2012
    Posts
    2
    Vote Rating
    0
    abc_check is on a distinguished road

      0  

    Default Is there a version of this plugin for ExtJS 3.4???

    Is there a version of this plugin for ExtJS 3.4???


    Is there a version of this plugin for ExtJS 3.4???

  9. #829
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
    zhaoshixuan is on a distinguished road

      0  

    Default The defer of onBlur function problem

    The defer of onBlur function problem


    Hi, I encounter a problem. When the cursor is in the datetime field, I submit and the defered funcion in onBlur function will take effect after the request is sent.
    Thus, the new value of this field will miss passing to the controller.
    Now, I have to defer 100ms the submit function and wait for datetime field's onBlur taking effect.
    It is not a good idea, 100ms is too large and lowers performance.
    If I reduce the defer time of onBlur function, It will bring another problem. If you focus is in date field, onBlur function will take effect when you click the time field's trigger button. Thus, the cursor will blur out of the component.
    Will anyone have better solution?
    Beg for your help!

  10. #830
    Touch Premium Member
    Join Date
    Jan 2008
    Location
    Quebec, Canada
    Posts
    122
    Vote Rating
    1
    nbourdeau is on a distinguished road

      0  

    Default


    Quote Originally Posted by zhaoshixuan View Post
    Hi, I encounter a problem. When the cursor is in the datetime field, I submit and the defered funcion in onBlur function will take effect after the request is sent.
    Thus, the new value of this field will miss passing to the controller.
    Now, I have to defer 100ms the submit function and wait for datetime field's onBlur taking effect.
    It is not a good idea, 100ms is too large and lowers performance.
    If I reduce the defer time of onBlur function, It will bring another problem. If you focus is in date field, onBlur function will take effect when you click the time field's trigger button. Thus, the cursor will blur out of the component.
    Will anyone have better solution?
    Beg for your help!
    Hi, this is the version I'm using and it works great for me (inspect the onSpecialKey handlers) :

    Code:
    Ext.define('Ext.ux.form.field.DateTime', {
        extend:'Ext.form.FieldContainer',
        mixins: {
            field: 'Ext.form.field.Field'
        },
        alias: 'widget.datetimefield',
        layout: 'fit',
        timePosition:'right', // valid values:'below', 'right'
        dateCfg:{},
        timeCfg:{},
        allowBlank: true,
    
    
        initComponent: function() {
            var me = this;
            me.buildField();
            me.callParent();
            this.dateField = this.down('datefield');
            this.timeField = this.down('timefield');
            me.initField();
        },
    
    
        //@private
        buildField: function() {
            var l;
            var d = {};
            if (this.timePosition == 'below') {
                l = {type: 'anchor'};
                d = {anchor: '100%'};
            } else
                l = {type: 'hbox', align: 'middle'};
            this.items = {
                xtype: 'container',
                layout: l,
                defaults: d,
                items: [Ext.apply({
                    xtype: 'datefield',
                    format: 'Y-m-d',
                    width: this.timePosition != 'below' ? 100 : undefined,
                    allowBlank: this.allowBlank,
                    listeners: {
                        specialkey: this.onSpecialKey,
                        scope: this
                    },
                    isFormField: false // prevent submission
                }, this.dateCfg), Ext.apply({
                    xtype: 'timefield',
                    format: 'H:i',
                    margin: this.timePosition != 'below' ? '0 0 0 3' : 0,
                    width: this.timePosition != 'below' ? 80 : undefined,
                    allowBlank: this.allowBlank,
                    listeners: {
                        specialkey: this.onSpecialKey,
                        scope: this
                    },
                    isFormField: false // prevent submission
                }, this.timeCfg)]
            };
        },
    
    
        focus: function() {
            this.callParent();
            this.dateField.focus(false, 100);
        },
    
    
        // Handle tab events
        onSpecialKey:function(cmp, e) {
            var key = e.getKey();
            if (key === e.TAB) {
                if (cmp == this.dateField) {
                    // fire event in container if we are getting out of focus from datefield
                    if (e.shiftKey) {
                        this.fireEvent('specialkey', this, e);
                    }
                }
                if (cmp == this.timeField) {
                    if (!e.shiftKey) {
                        this.fireEvent('specialkey', this, e);
                    }
                }
            } else if (this.inEditor) {
                this.fireEvent('specialkey', this, e);
            }
        },
    
    
        getValue: function() {
            var value, date = this.dateField.getSubmitValue(), time = this.timeField.getSubmitValue();
            if (date) {
                if (time) {
                    var format = this.getFormat();
                    value = Ext.Date.parse(date + ' ' + time, format);
                } else {
                    value = this.dateField.getValue();
                }
            }
            return value
        },
    
    
        setValue: function(value) {
            this.dateField.setValue(value);
            this.timeField.setValue(value);
        },
    
    
        getSubmitData: function() {
            var value = this.getValue();
            var format = this.getFormat();
            return value ? Ext.Date.format(value, format) : null;
        },
    
    
        getFormat: function() {
            return (this.dateField.submitFormat || this.dateField.format) + " " + (this.timeField.submitFormat || this.timeField.format)
        },
    
    
        getErrors: function() {
            return this.dateField.getErrors().concat(this.timeField.getErrors());
        },
    
    
        validate: function() {
            if (this.disabled)
                return true;
            else {
                var isDateValid = this.dateField.validate();
                var isTimeValid = this.timeField.validate();
                return isDateValid && isTimeValid;
            }
        },
    
    
        reset: function() {
            this.mixins.field.reset();
            this.dateField.reset();
            this.timeField.reset();
        }
    
    
    });

Thread Participants: 208

  1. galdaka (1 Post)
  2. grEvenX (1 Post)
  3. wolverine4277 (1 Post)
  4. berend (1 Post)
  5. umlbuzzard (1 Post)
  6. mystix (8 Posts)
  7. dawesi (4 Posts)
  8. gabbay (1 Post)
  9. JorisA (2 Posts)
  10. burn (1 Post)
  11. wenner (6 Posts)
  12. DigitalSkyline (1 Post)
  13. ChrisR (3 Posts)
  14. cocorossello (1 Post)
  15. 72 (1 Post)
  16. akannu (1 Post)
  17. danh2000 (2 Posts)
  18. DeeZ (1 Post)
  19. daviscabral (3 Posts)
  20. sharman (1 Post)
  21. ajaxE (3 Posts)
  22. ryedin (3 Posts)
  23. dandfra (5 Posts)
  24. anjelika (1 Post)
  25. MaximGB (1 Post)
  26. chernomorez (1 Post)
  27. smokeman (1 Post)
  28. FoGhost (1 Post)
  29. jcwatson11 (4 Posts)
  30. kevinwu8 (11 Posts)
  31. magunes117 (4 Posts)
  32. Barius (2 Posts)
  33. linizou (2 Posts)
  34. Clever Cutter (1 Post)
  35. Rui Lopes (3 Posts)
  36. henryli86 (1 Post)
  37. dima (1 Post)
  38. KevinChristensen (1 Post)
  39. rlx (1 Post)
  40. derbbre (1 Post)
  41. aacraig (5 Posts)
  42. kafsinkaf (1 Post)
  43. durlabh (5 Posts)
  44. Egor (1 Post)
  45. keypoint (2 Posts)
  46. elDub (7 Posts)
  47. anotherpit (3 Posts)
  48. sean.zhou (9 Posts)
  49. x51596 (1 Post)
  50. ray007 (2 Posts)
  51. seethrubob (1 Post)
  52. Gerrat (2 Posts)
  53. dphu (2 Posts)
  54. multiversal (1 Post)
  55. atascon (2 Posts)
  56. michaelc (3 Posts)
  57. adinata (2 Posts)
  58. jburnhams (1 Post)
  59. Hani79 (6 Posts)
  60. dearsina (1 Post)
  61. gfuture (1 Post)
  62. relix01 (3 Posts)
  63. ttony (2 Posts)
  64. danderson (3 Posts)
  65. marco76 (5 Posts)
  66. tarini (4 Posts)
  67. dorgan (5 Posts)
  68. acontreras (3 Posts)
  69. lobo-tuerto (4 Posts)
  70. trancee (1 Post)
  71. calavera (1 Post)
  72. broutard (1 Post)
  73. httpdotcom (2 Posts)
  74. Stefan B (7 Posts)
  75. vilivili (3 Posts)
  76. masterbuddha (2 Posts)
  77. sinma (1 Post)
  78. incaic (2 Posts)
  79. nbourdeau (7 Posts)
  80. miles.huang (1 Post)
  81. radtad (9 Posts)
  82. jenner (1 Post)
  83. demon222 (1 Post)
  84. Paul Middelkoop (1 Post)
  85. PremiereGlobal (3 Posts)
  86. qlegrand (4 Posts)
  87. LedrickLeron (2 Posts)
  88. dirkr (4 Posts)
  89. rhytha (1 Post)
  90. infinit (1 Post)
  91. ClemsonJeeper (6 Posts)
  92. conorarmstrong (2 Posts)
  93. mtrax (1 Post)
  94. ignatius (3 Posts)
  95. brenda (1 Post)
  96. xavierg (1 Post)
  97. vcastel (5 Posts)
  98. Arthur.Blake (4 Posts)
  99. dgms (1 Post)
  100. bjw5392 (2 Posts)
  101. Stripeman (2 Posts)
  102. EzBulka (2 Posts)
  103. wuschba (4 Posts)
  104. NoahK17 (3 Posts)
  105. Remy (11 Posts)
  106. predragp (1 Post)
  107. Barbanek (1 Post)
  108. johnymutton (3 Posts)
  109. abraxxa (28 Posts)
  110. cvieira (2 Posts)
  111. smithrp (1 Post)
  112. Rotomaul (1 Post)
  113. nebbian (2 Posts)
  114. tubinee (3 Posts)
  115. jhoni.chen (1 Post)
  116. snehat (1 Post)
  117. kevinconaway (1 Post)
  118. kristalgic (1 Post)
  119. hAmpzter (6 Posts)
  120. mono blaine (5 Posts)
  121. rhuanca (2 Posts)
  122. Akamy2kidsmom (2 Posts)
  123. haloween (1 Post)
  124. shiv (9 Posts)
  125. dekely (12 Posts)
  126. aborjinos (1 Post)
  127. canxss (6 Posts)
  128. khewuwei (2 Posts)
  129. lakshmi (4 Posts)
  130. notdet (3 Posts)
  131. dizor (1 Post)
  132. mschwartz (5 Posts)
  133. sprestel (1 Post)
  134. JAnderson (1 Post)
  135. maiconschelter (1 Post)
  136. oegozi (6 Posts)
  137. Dumas (3 Posts)
  138. jgeewax (1 Post)
  139. ylaroche (5 Posts)
  140. marcvdm (2 Posts)
  141. Grolubao (2 Posts)
  142. uptodate (2 Posts)
  143. Jangla (6 Posts)
  144. rob_howe (1 Post)
  145. pibree (1 Post)
  146. einavb (2 Posts)
  147. bbirtle (1 Post)
  148. annextjs (7 Posts)
  149. ampnezz (2 Posts)
  150. mogwai (1 Post)
  151. igreg (1 Post)
  152. dthemistokleous (1 Post)
  153. quicksilver_in (2 Posts)
  154. Opsone (2 Posts)
  155. Gonfi (2 Posts)
  156. Keylan (1 Post)
  157. Sigma (1 Post)
  158. advarot (1 Post)
  159. Scott Murawski (4 Posts)
  160. isit.gd (1 Post)
  161. realjax (3 Posts)
  162. tigerfoot (8 Posts)
  163. harel (2 Posts)
  164. iryndin (1 Post)
  165. roger.harrington (1 Post)
  166. cscagliola (2 Posts)
  167. Kirill_Sychin (3 Posts)
  168. mrjoltcola (5 Posts)
  169. innerbreath (1 Post)
  170. mebuzzme (1 Post)
  171. sramirez (1 Post)
  172. ilevina (2 Posts)
  173. boyan.dimitrov (1 Post)
  174. lwarring (1 Post)
  175. codeable (1 Post)
  176. ozum (2 Posts)
  177. chenzero (4 Posts)
  178. erdna (4 Posts)
  179. icarey (2 Posts)
  180. heratech (1 Post)
  181. stevek (1 Post)
  182. DanielT (2 Posts)
  183. seand (1 Post)
  184. smartbinary (2 Posts)
  185. taporari (2 Posts)
  186. Lobo (2 Posts)
  187. daydreamer01 (1 Post)
  188. oldtenen (1 Post)
  189. krishnaswamy (1 Post)
  190. ajmas (1 Post)
  191. maina (1 Post)
  192. Joe Kuan (3 Posts)
  193. easley (3 Posts)
  194. marc123 (2 Posts)
  195. njsnow7 (1 Post)
  196. I_Leising (1 Post)
  197. olka (1 Post)
  198. bee (1 Post)
  199. jonaldomo (1 Post)
  200. ithompson (2 Posts)
  201. Jojo79 (2 Posts)
  202. zhaoshixuan (1 Post)
  203. SSzretter (1 Post)
  204. amsalak (1 Post)
  205. abc_check (1 Post)
  206. Deadlock (1 Post)
  207. kirlisakal (1 Post)
  208. endino (1 Post)