SEARCH-480

- Added date filter
This commit is contained in:
Keerthi Niranjan
2017-11-21 13:07:47 +05:30
parent 6b1cb11db7
commit 38e27bba1f
+4 -4
View File
@@ -256,16 +256,16 @@ class Search {
let sd = new Date().getTime() - SEARCH_PERIOD_SUBTRACTOR;
let sd_time = MINIMUM_DATE;
if (startDate && startDate !== "" && typeof startDate === 'object') {
sd_time = new Date(startDate).getTime();
if (startDate && startDate !== "") {
sd_time = new Date(parseInt(startDate, 10)).getTime();
if (sd_time >= sd) {
sd_time = sd;
}
}
let ed_time = MAXIMUM_DATE;
if (endDate && endDate !== "" && typeof endDate === 'object') {
ed_time = new Date(endDate).getTime();
if (endDate && endDate !== "") {
ed_time = new Date(parseInt(endDate, 10)).getTime();
}
if (!_limit && _limit === "" && typeof _limit !== 'number' && Math.round(_limit) !== _limit) {