From 81d26a5442799864d9bbb5e03e68fbfc2f1b7013 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 8 Jun 2016 22:40:36 +0100 Subject: [PATCH] Fixed the issue on the landing page #298 --- PlexRequests.UI/Views/Admin/LandingPage.cshtml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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"),