Results 1 to 5 of 5

Thread: TimeField issue when default Value does not match increment

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-18741 in 6.0.1.
  1. #1
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    22
    Vote Rating
    8
      1  

    Default TimeField issue when default Value does not match increment

    Please have a look at the following fiddle:

    https://fiddle.sencha.com/#fiddle/ra6

    I specified an interval of 15. The first field has a value of 15:00, and everything works. The second one has a value of 15:03 (which is not part of the suggested values, but since snapToIncrement is false, it should still be valid) and you cannot select a value:
    A js error occurs:
    Uncaught TypeError: date1.getTime is not a function

    Thanks for your help,
    TkDodo

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Vote Rating
    296
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    22
    Vote Rating
    8
      1  

    Default

    It's nice to hear that you have fixed this in 6.0.1. However, we are using 5.1 and are not planning on upgrading soon. Is there any chance that you will fix this in a 5.x release or provide a workaround / monkey patch for that?

  4. #4
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,018
    Vote Rating
    125
      0  

    Default

    Hi @TkDodo,

    Maybe, it is already not actual for you, but still - we used this override for 5.1.1.
    Code:
    Ext.form.field.Time.override({
        isEqual: function (v1, v2) {
            var fromArray = Ext.Array.from,
                isEqual = Ext.Date.isEqual,
                i, len;
    
            v1 = fromArray(v1);
            v2 = fromArray(v2);
            len = v1.length;
    
            if (len !== v2.length) {
                return false;
            }
    
            for (i = 0; i < len; i++) {
                if (!Ext.isDate(v2[i]) || !Ext.isDate(v1[i] || !isEqual(v2[i], v1[i]) {
                    return false;
                }
            }
    
            return true;
        }
    });
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  5. #5
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    22
    Vote Rating
    8
      0  

    Default

    Just wanted to tell everyone that this fix seems to be also in ExtJs 5.1.2Thanks for that!TkDodo

Similar Threads

  1. Replies: 2
    Last Post: 15 Feb 2015, 8:48 PM
  2. Timefield.increment Override? (Displaying 11:59 PM)
    By Steve_Terry in forum Ext: Q&A
    Replies: 4
    Last Post: 30 Jul 2012, 10:07 AM
  3. [TimeField] Increment
    By Siriru in forum Ext: Discussion
    Replies: 3
    Last Post: 21 Sep 2011, 12:59 PM
  4. How to change TimeField minValue, maxValue and increment dynamically ?
    By disizben in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 21 Mar 2008, 12:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •