Show
Ignore:
Timestamp:
03/19/08 21:09:13 (8 months ago)
Author:
peller
Message:

Don't compute seconds to go on an empty text box. Fixes #6259.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/demos/nihao.html

    r10464 r13153  
    1212                </script> 
    1313 
    14                 <script type="text/javascript" src="../../dojo/dojo.js"></script> 
     14                <script type="text/javascript" isDebug="true" src="../../dojo/dojo.js"></script> 
    1515         
    1616                <style type="text/css"> 
     
    6060                        function dateChanged(){ 
    6161                                if(resourceBundle){ 
    62                                         dojo.byId('secondsToGo').innerHTML = dojo.string.substitute( 
    63                                                 resourceBundle.dateStr, 
    64                                                 [dojo.number.format((dijit.byId("dateBox").getValue() - new Date()) / 1000)]); 
     62                                        var stamp = dijit.byId("dateBox").getValue(); 
     63                                        if(stamp){ 
     64                                                dojo.byId('secondsToGo').innerHTML = dojo.string.substitute( 
     65                                                        resourceBundle.dateStr, 
     66                                                        [dojo.number.format((stamp - new Date()) / 1000)]); 
     67                                        } 
    6568                                } 
    6669                        }