1. #1
    Sencha User edykstra's Avatar
    Join Date
    Feb 2009
    Posts
    98
    Vote Rating
    2
    edykstra is on a distinguished road

      0  

    Default Which date field has the 'greater' date?

    Which date field has the 'greater' date?


    I have a form with 2 date fields.

    Inside the select event of each, I want to check to see if it is 'greater' (after) than the other. How do I do that?

    It should be EASY - but this is a classic example of the ExtJS docs reminding me of the Seinfeld episode 'A lot about nothing'.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,828
    Vote Rating
    609
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      -1  

    Default


    Not sure what this has to do with the Ext docs.

    Should we include a section "How to check if one date is greater than another date".

    Anyway, it is easy and it's done in JS:

    Code:
    // May also want to deal with nulls
    var d1 = field1.getValue().getTime(),
        d2 = field2.getValue().getTime();
    
    console.log(d1 > d2);
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi