-const moment = require('moment');
+import * as Dates from "../services/dates";
let data = {
terms: '',
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);
},
module.exports = {
data, computed, methods, created
-};
\ No newline at end of file
+};