diff --git a/PlexRequests.UI/Views/Admin/LandingPage.cshtml b/PlexRequests.UI/Views/Admin/LandingPage.cshtml index 54f252daf..dbc81d156 100644 --- a/PlexRequests.UI/Views/Admin/LandingPage.cshtml +++ b/PlexRequests.UI/Views/Admin/LandingPage.cshtml @@ -1,5 +1,6 @@ @using PlexRequests.UI.Helpers @Html.Partial("_Sidebar") +@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase
@@ -76,7 +77,7 @@
- + @@ -86,7 +87,7 @@
- + @@ -119,13 +120,22 @@ $('#startDate').data("DateTimePicker").maxDate(e.date); }); + var start = ''; + var end = ''; + if ($startDate.data("DateTimePicker").date()) { + start = $startDate.data("DateTimePicker").date().toISOString(); + } + if ($endDate.data("DateTimePicker").date()) { + end = $endDate.data("DateTimePicker").date().toISOString(); + } + $('#save').click(function (e) { e.preventDefault(); var $form = $("#mainForm"); var data = $form.serialize(); - data = data + "¬iceStart=" + $startDate.data("DateTimePicker").date().toISOString() + "¬iceEnd=" + $endDate.data("DateTimePicker").date().toISOString(); + data = data + "¬iceStart=" + start + "¬iceEnd=" + end; $.ajax({ type: $form.prop("method"),