CC-5727 : History search range using incorrect timezone offset (also Nowplaying)

sending the timestamp string back for nowplaying as well.
added error class to history page if end is < start.
This commit is contained in:
Naomi 2014-03-10 18:33:07 -04:00
parent 1854d76f03
commit 8d2926aeed
5 changed files with 129 additions and 66 deletions

View file

@ -90,20 +90,34 @@ var AIRTIME = (function(AIRTIME){
*
* @return Object {"start", "end", "range"}
*/
mod.fnGetScheduleRange = function(dateStart, timeStart, dateEnd, timeEnd) {
var iStart,
iEnd,
iRange;
mod.fnGetScheduleRange = function(dateStartId, timeStartId, dateEndId, timeEndId) {
var start,
end,
time;
iStart = AIRTIME.utilities.fnGetTimestamp(dateStart, timeStart);
iEnd = AIRTIME.utilities.fnGetTimestamp(dateEnd, timeEnd);
start = $(dateStartId).val();
start = start === "" ? null : start;
iRange = iEnd - iStart;
time = $(timeStartId).val();
time = time === "" ? "00:00" : time;
if (start) {
start = start + " " + time;
}
end = $(dateEndId).val();
end = end === "" ? null : end;
time = $(timeEndId).val();
time = time === "" ? "00:00" : time;
if (end) {
end = end + " " + time;
}
return {
start: iStart,
end: iEnd,
range: iRange
start: start,
end: end
};
};