FIX: Tests involving dates were logging warnings

FIX: Tests involving dates were logging warnings

diff --git a/app/assets/javascripts/discourse/app/components/date-input.js b/app/assets/javascripts/discourse/app/components/date-input.js
index 0b03e6b..08d995a 100644
--- a/app/assets/javascripts/discourse/app/components/date-input.js
+++ b/app/assets/javascripts/discourse/app/components/date-input.js
@@ -103,7 +103,7 @@ export default Component.extend({
       /* do nothing for native */
     };
     picker.setDate = date => {
-      picker.value = moment(date).format("YYYY-MM-DD");
+      picker.value = date ? moment(date).format("YYYY-MM-DD") : null;
     };
     picker.setMinDate = date => {
       picker.min = date;
diff --git a/test/javascripts/acceptance/search-full-test.js b/test/javascripts/acceptance/search-full-test.js
index 06af593..3543d28 100644
--- a/test/javascripts/acceptance/search-full-test.js
+++ b/test/javascripts/acceptance/search-full-test.js
@@ -302,7 +302,7 @@ QUnit.test("update post time through advanced search ui", async assert => {
   await visit("/search");
 
   await fillIn(".search-query", "none");
-  await fillIn("#search-post-date .date-picker", "October 5, 2016");
+  await fillIn("#search-post-date .date-picker", "2016-10-05");
 
   const postTimeSelector = selectKit(
     ".search-advanced-options .select-kit#postTime"

GitHub sha: 394b5db8