diff --git a/WebfrontCore/Views/Shared/Partials/_SearchResourceFilter.cshtml b/WebfrontCore/Views/Shared/Partials/_SearchResourceFilter.cshtml index 63a3454e8..e7d36ce77 100644 --- a/WebfrontCore/Views/Shared/Partials/_SearchResourceFilter.cshtml +++ b/WebfrontCore/Views/Shared/Partials/_SearchResourceFilter.cshtml @@ -2,6 +2,7 @@ @using SharedLibraryCore.Dtos @using WebfrontCore.QueryHelpers.Models @using Data.Models +@using System.Globalization @model string @{ var existingClientFilter = ViewBag.ClientResourceRequest as ClientResourceRequest; @@ -97,14 +98,14 @@
- @{ var oneYearAgo = DateTime.UtcNow.AddYears(-1).ToShortDateString(); } + @{ var presetDate = (existingClientFilter?.ClientConnected ?? DateTime.UtcNow.AddYears(-1)).ToString("s", CultureInfo.InvariantCulture); } + id="clientConnected@(Model)" data-date="@presetDate" + value="@presetDate"/>
- @if (existingClientFilter?.Direction is SortDirection.Descending) + @if ((existingClientFilter?.Direction ?? SortDirection.Descending) is SortDirection.Descending) {