diff --git a/NzbDrone.Web/Controllers/HistoryController.cs b/NzbDrone.Web/Controllers/HistoryController.cs index ba06654bc..3120e04b5 100644 --- a/NzbDrone.Web/Controllers/HistoryController.cs +++ b/NzbDrone.Web/Controllers/HistoryController.cs @@ -37,6 +37,7 @@ namespace NzbDrone.Web.Controllers 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 4d3c78911..b1764925e 100644 --- a/NzbDrone.Web/Controllers/MissingController.cs +++ b/NzbDrone.Web/Controllers/MissingController.cs @@ -31,7 +31,7 @@ namespace NzbDrone.Web.Controllers 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 29957d561..228a5903b 100644 --- a/NzbDrone.Web/Controllers/UpcomingController.cs +++ b/NzbDrone.Web/Controllers/UpcomingController.cs @@ -46,7 +46,7 @@ namespace NzbDrone.Web.Controllers 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 3b15b99c7..61eb6e802 100644 --- a/NzbDrone.Web/Models/HistoryModel.cs +++ b/NzbDrone.Web/Models/HistoryModel.cs @@ -14,6 +14,7 @@ namespace NzbDrone.Web.Models 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 f037e4d61..ac6547ff6 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\"";