Results 1 to 8 of 8

Thread: Please... how do I override Ext.Date strict field. Should be easy.

  1. #1
    Sencha User
    Join Date
    Dec 2013
    Posts
    6

    Default Answered: Please... how do I override Ext.Date strict field. Should be easy.

    How do I override the Ext.Date.useStrict to be true. I have tried everything I can think of and nothing seems to work... apply, override, just setting it... nothing. Sample please? ExtJS 4.0.7 / IE 8

    None of these work:

    Code:
    Ext.Date.useString = true;  //causes  bug in 'anonymous' code, whatever that is
     
    Date.useString = true;
    
    
    Ext.apply('Ext.Date',({
          useStrict: true
      });                   
     
    
      Ext.Date.override({
          useStrict: true
       });          //not supported
    
    
      Ext.override(Ext.form.DateField, {
          useStrict: true
      });   
    
    Ext.override(Ext.form.DateField, {
          strict: true
      });    //simply ignores these
    I give up... so frustrating. Thanks in advance for any help you can give.
    Last edited by marsha; 10 Mar 2014 at 8:17 PM. Reason: added attempts at code

  2. Sorry, I was testing with 4.2.1. I just checked again and just adding the following worked for me under 4.0.7.

    Code:
    Ext.Date.useStrict = true;

  3. #2
    Sencha Premium User
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    337
    Answers
    62

    Default

    Code:
    Ext.define('Overrides.form.field.Date', {
        override: 'Ext.form.field.Date',
        useStrict: true
    });

  4. #3
    Sencha User
    Join Date
    Dec 2013
    Posts
    6

    Default

    Thank you very much. That didn't work either but I do appreciate your response and it gives me yet another way to code.

    Maybe the problem is IE8... I can't use Fiddle in this version of IE either, and I can use Fiddle in other browsers.

  5. #4
    Sencha Premium User
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    337
    Answers
    62

    Default

    Sorry, I was testing with 4.2.1. I just checked again and just adding the following worked for me under 4.0.7.

    Code:
    Ext.Date.useStrict = true;

  6. #5
    Sencha Premium User
    Join Date
    Mar 2011
    Posts
    287
    Answers
    35

    Default

    Is the posted code a typo in the post only and not in your test of it? (i.e. 'useString' instead of 'useStrict')
    Code:
    Ext.Date.useString = true;  //causes  bug in 'anonymous' code, whatever that is

  7. #6
    Sencha User
    Join Date
    Dec 2013
    Posts
    6

    Default

    Yes, sorry, that's just a typo. I also tried useStrict and it doesn't work either.

  8. #7
    Sencha Premium User
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    337
    Answers
    62

    Default

    Here's a working example:


  9. #8
    Sencha User
    Join Date
    Dec 2013
    Posts
    6

    Default

    Thank you. I'm considering this ANSWERED because I put "Ext.Date.useStrict = true;" in a couple of browsers and it worked perfectly. For some reason I have problems with IE8, or maybe my copy is corrupt.

    Thanks!

Posting Permissions

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