changeset 97:9a549ca6e664

Only getTimte from datefield if the value is not null.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 14 Jun 2013 15:53:21 +0200
parents ecb0c0cf386b
children 0a104617a700
files app/controller/Sql.js
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Sql.js	Fri Jun 14 11:13:03 2013 +0200
+++ b/app/controller/Sql.js	Fri Jun 14 15:53:21 2013 +0200
@@ -63,8 +63,9 @@
             }
         } else {
             // Get date object an convert it into a timestamp (ms since epoch)
-            var ts = Ext.getCmp('pbegin').getValue().getTime();
-            if (ts !== null) {
+            var datefield = Ext.getCmp('pbegin').getValue();
+            if (datefield !== null) {
+                var ts = Ext.getCmp('pbegin').getValue().getTime();
                 searchParams['begin'] = ts;
             }
         }

http://lada.wald.intevation.org