diff --git a/NzbDrone.Web/Controllers/HistoryController.cs b/NzbDrone.Web/Controllers/HistoryController.cs index ba06654bca..3120e04b5b 100644 --- a/NzbDrone.Web/Controllers/HistoryController.cs +++ b/NzbDrone.Web/Controllers/HistoryController.cs @@ -37,6 +37,7 @@ public JsonResult AjaxBinding() Quality = h.Quality.ToString(), IsProper = h.IsProper, Date = h.Date.ToString(), + DateSorter = h.Date.ToString("MM/dd/yyyy h:mm:ss tt"), Indexer = h.Indexer, EpisodeId = h.EpisodeId }).OrderByDescending(h => h.Date).ToList(); diff --git a/NzbDrone.Web/Controllers/MissingController.cs b/NzbDrone.Web/Controllers/MissingController.cs index 4d3c789115..b1764925e8 100644 --- a/NzbDrone.Web/Controllers/MissingController.cs +++ b/NzbDrone.Web/Controllers/MissingController.cs @@ -31,7 +31,7 @@ public ActionResult Index() EpisodeTitle = e.Title, Overview = e.Overview, SeriesTitle = e.Series.Title, - AirDate = e.AirDate.Value.ToString(), + AirDate = e.AirDate.Value.ToString("MM/dd/yyyy"), AirDateString = e.AirDate.Value.ToBestDateString() }); diff --git a/NzbDrone.Web/Controllers/UpcomingController.cs b/NzbDrone.Web/Controllers/UpcomingController.cs index 29957d5615..228a5903ba 100644 --- a/NzbDrone.Web/Controllers/UpcomingController.cs +++ b/NzbDrone.Web/Controllers/UpcomingController.cs @@ -46,7 +46,7 @@ private List GetUpcomingEpisodeModels(List episod Overview = u.Overview, AirDateTime = GetDateTime(u.AirDate.Value, u.Series.AirTimes), AirDate = u.AirDate.Value.ToBestDateString(), - AirTime = String.IsNullOrEmpty(u.Series.AirTimes) ? "?" : Convert.ToDateTime(u.Series.AirTimes).ToShortTimeString(), + AirTime = String.IsNullOrEmpty(u.Series.AirTimes) ? "?" : Convert.ToDateTime(u.Series.AirTimes).ToString("MM/dd/yyyy"), Status = u.Status.ToString() }).OrderBy(e => e.AirDateTime).ToList(); } diff --git a/NzbDrone.Web/Models/HistoryModel.cs b/NzbDrone.Web/Models/HistoryModel.cs index 3b15b99c73..61eb6e802c 100644 --- a/NzbDrone.Web/Models/HistoryModel.cs +++ b/NzbDrone.Web/Models/HistoryModel.cs @@ -14,6 +14,7 @@ public class HistoryModel public string NzbTitle { get; set; } public string Quality { get; set; } public string Date { get; set; } + public string DateSorter { get; set; } public bool IsProper { get; set; } public string Indexer { get; set; } public int EpisodeId { get; set; } diff --git a/NzbDrone.Web/Views/History/Index.cshtml b/NzbDrone.Web/Views/History/Index.cshtml index f037e4d618..ac6547ff6e 100644 --- a/NzbDrone.Web/Views/History/Index.cshtml +++ b/NzbDrone.Web/Views/History/Index.cshtml @@ -73,6 +73,15 @@ { sWidth: 'auto', "mDataProp": "EpisodeTitle", "bSortable": false }, //Episode Title { sWidth: '70px', "mDataProp": "Quality", "bSortable": false }, //Quality { sWidth: '150px', "mDataProp": "Date" }, //Grabbed On + { sWidth: '150px', "mDataProp": function (source, type, val) { + // 'display' and 'filter' use our fancy naming + if (type === 'display' || type === 'filter') { + return source["Date"]; + } + // 'sort' and 'type' both just use the raw data + return source["DateSorter"]; + } + }, //Date { sWidth: '40px', "mDataProp": "HistoryId", "bSortable": false, "fnRender": function (row) { var deleteImage = "\"Delete\""; var redownloadImage = "\"Redownload\"";