1. #1
    Sencha User
    Join Date
    Apr 2008
    Posts
    330
    Vote Rating
    0
    Jack_S is on a distinguished road

      0  

    Exclamation ExtJS - date format - Air security violation

    ExtJS - date format - Air security violation


    Hello All,

    This might be a bug.

    I want to render a grid row based on whether the expiry date is older then today. To make my life easier, form the server side i'm sending a data in the format YYYYMMDD. There I can simple do a greater or small then procedure.

    But I'm come across the following bug.
    When I try to format the date using the format function then I get a security violation. When I try to use the Ext.util.Formate.date then nothing happens.

    Has anybody had this issue before?

    here is how to replicate it.
    Create a button and add on-click event:

    Code:
    var a = new Date();
    a.clearTime(true);  //doesn't work
    					
    var b = new Date();
    b.format('Ymd'); //causes secdurity violation
    
    var c = new Date();
    Ext.util.Format.date(c,'Ymd');
    					
    alert('Date A is: ' + a + ' Date B is:' + a + ' Date C is: + c);
    Thanks in advance if anybody has found a work around.

    Jack

  2. #2
    Sencha User
    Join Date
    Dec 2008
    Posts
    105
    Vote Rating
    0
    piroman is on a distinguished road

      0  

    Talking


    just put all your date formats here before dom ready event

    Code:
    Date.precompileFormats('y|Y-m|m|d|D|Y|F|M|F Y|M Y|M y|f Y|Y/m/d H:i|m/d/Y|m/y|m Y|D d M Y|D M d Y H:i:s O|m/d/Y H:i|YmdHi');
    Ext.onReady(function() {
        App.init();
    });

  3. #3
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    478
    Vote Rating
    0
    cmendez21 is on a distinguished road

      0  

    Default


    What i did to resolve some date issues was to merge many functions from datejs library to date object so i can format with tostring function from datejs library and that solved my issue

    hope works for you
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar