Jump to content

How to Search By Entered Date + and - N Days?

Recommended Posts

Separate your search and report in two pages. In report page, include this date field to Configure Fields and add criteria to it for the first one check to receive [@from] and select "Comparison type" as "greater than or equal" and for second criteria receive [@to] and select "Comparison type" as "Less than or equal" .


In the submission page which is acting as search add a virtual field 1 and enable calendar pop up. Add two more hidden virtual fields. Virtual Field 2 is sending out [@from] and VirtualField3 is sending out [@to] as parameter

Add the code below to the footer of the page


document.getElementById("Submit").onmouseover = function(){

var d=document.getElementById('cbParamVirtual1').value;

var date= new Date(Date.parse(d));

var from = (date.getMonth() + 1) + "/" + (date.getDate()-3) + "/" + (date.getFullYear());
var to = (date.getMonth() + 1) + "/" + (date.getDate()+3) + "/" + (date.getFullYear());

document.getElementById("cbParamVirtual2"). value = from;
document.getElementById("cbParamVirtual3"). value = to;



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...