# HG changeset patch # User Torsten Irländer # Date 1371218001 -7200 # Node ID 9a549ca6e664c655692aa68705b5428a2f9637d5 # Parent ecb0c0cf386bd81e9a07b6bc19a2c3d1c60e265f Only getTimte from datefield if the value is not null. diff -r ecb0c0cf386b -r 9a549ca6e664 app/controller/Sql.js --- 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; } }