This topic is locked

Search panel date bug?

5/21/2021 10:27:17 AM
PHPRunner General questions
author

Hi everyone,

I'm still having this date bug in search panel where I key in date between, it doesnt return the FROM date result (picture 1 & 2). However, using Advance search will return the correct result(picture 3 & 4).

Is this a bug or am I doing something wrong? I would really want this to work.

Using PHPrunner 10.5, mysql.

Regards,
Gary

img alt

img alt

img alt

img alt

HJB 5/21/2021

Try the Java Script below in SEARCH page under Javascript OnLoad event

"Date listed" seen in the code is the placeholder, to be replaced by your own "date field" expression.

$("#srchOpt_1_Date_Listed").val('Between');

$("#srchOpt_1_Date_Listed").trigger('change');

var ctrl = Runner.getControl(pageid, 'Date Listed');

var d1 = new Date();

d1.setDate(d1.getDate() - 14);

ctrl.setValue(d1);
var ctrl2 = Runner.controls.ControlManager.getAt(false, 1, 'Date Listed',1);

var d2 = new Date();

ctrl2.setValue(d2);

P.S. Set Search Option in LIST page

256412 5/22/2021

Thanks HJB. unfortunately your solution is not what i'm seeking.

anyway, after more testing and 1 sleepless night, i finally found out the problem.

The SEARCH PANEL does not work well with SQL VIEW with "DATE" field. If I change the field to "DATETIME" it showed correctly. However the table's field also have to be in DATETIME.

I believe this is a bug within the SQL view. Hope xlinesoft will notice this.

Regards,
Gary