]> BookStack Code Mirror - bookstack/blobdiff - resources/assets/js/vues/search.js
Updated 'Spanish Argentina' translation.
[bookstack] / resources / assets / js / vues / search.js
index 515ca3bc9dfb8d8c327d1dc5cb8521a3df279442..c0410463323014d4f94d00de30a118bbe8b2b896 100644 (file)
@@ -1,4 +1,4 @@
-const moment = require('moment');
+import * as Dates from "../services/dates";
 
 let data = {
     terms: '',
@@ -149,11 +149,11 @@ let methods = {
 
     updateSearch(e) {
         e.preventDefault();
-        window.location = '/search?term=' + encodeURIComponent(this.termString);
+        window.location = window.baseUrl('/search?term=' + encodeURIComponent(this.termString));
     },
 
     enableDate(optionName) {
-        this.search.dates[optionName.toLowerCase()] = moment().format('YYYY-MM-DD');
+        this.search.dates[optionName.toLowerCase()] = Dates.getCurrentDay();
         this.dateChange(optionName);
     },
 
@@ -192,4 +192,4 @@ function created() {
 
 module.exports = {
     data, computed, methods, created
-};
\ No newline at end of file
+};