This commit is contained in:
parent
45f31e360c
commit
97dba4cd01
@ -8,6 +8,17 @@ const gen_id = (length)=>{
|
||||
return result;
|
||||
}
|
||||
|
||||
Date.prototype.toJSONLocal = (function() {
|
||||
function addZ(n) {
|
||||
return (n<10? '0' : '') + n;
|
||||
}
|
||||
return function() {
|
||||
return this.getFullYear() + '-' +
|
||||
addZ(this.getMonth() + 1) + '-' +
|
||||
addZ(this.getDate());
|
||||
};
|
||||
}())
|
||||
|
||||
const query_nominatim = (q,f)=>{
|
||||
const ENDPOINT = '/api/place/'+q;
|
||||
return axios.get(ENDPOINT).then(res=>res.data).then(res=>res.filter(f));
|
||||
@ -89,6 +100,12 @@ const app = new Vue({
|
||||
query:{hotel:[],flight:[],nominatim:[]},
|
||||
querying:{hotel:false,flight:false,place:false,food:false},
|
||||
impexp:"",
|
||||
lang: {
|
||||
formatLocale: {
|
||||
firstDayOfWeek: 1,
|
||||
},
|
||||
monthBeforeYear: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
start_journey: function(event){
|
||||
@ -179,7 +196,7 @@ const app = new Vue({
|
||||
return this.format_date(date)
|
||||
},
|
||||
format_date: function(d){
|
||||
var dt = d.toJSON().slice(0, 10);
|
||||
var dt = d.toJSONLocal().slice(0, 10);
|
||||
return dt.slice(8, 10) + '/'
|
||||
+ dt.slice(5, 7) + '/'
|
||||
+ dt.slice(0, 4) + ' ('
|
||||
|
@ -8,20 +8,8 @@
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700,300" type="text/css">
|
||||
<link rel='stylesheet' href='/public/css/index.css'/>
|
||||
|
||||
<script src="https://unpkg.com/vue/dist/vue.min.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/vue2-datepicker/index.min.js"></script>
|
||||
<link rel="stylesheet" href="https://unpkg.com/vue2-datepicker/index.css">
|
||||
|
||||
<link rel="stylesheet" href="//unpkg.com/leaflet/dist/leaflet.css" />
|
||||
<script src="//unpkg.com/leaflet/dist/leaflet.js"></script>
|
||||
<script src="//unpkg.com/vue2-leaflet"></script>
|
||||
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<script src="https://unpkg.com/lodash/lodash.min.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/vue-multiselect"></script>
|
||||
<link rel="stylesheet" href="https://unpkg.com/vue-multiselect/dist/vue-multiselect.min.css">
|
||||
</head>
|
||||
<body>
|
||||
@ -121,6 +109,15 @@
|
||||
|
||||
</main>
|
||||
|
||||
<script src="https://unpkg.com/vue/dist/vue.min.js"></script>
|
||||
<script src="https://unpkg.com/vue2-datepicker/index.min.js"></script>
|
||||
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
|
||||
<script src="https://unpkg.com/vue2-leaflet"></script>
|
||||
<script src="https://unpkg.com/leaflet.awesome-markers/dist/leaflet.awesome-markers.min.js"></script>
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<script src="https://unpkg.com/lodash/lodash.min.js"></script>
|
||||
<script src="https://unpkg.com/vue-multiselect"></script>
|
||||
<script src="https://unpkg.com/vue-textarea-autosize/dist/vue-textarea-autosize.umd.min.js"></script>
|
||||
<script src="/public/js/main.js" type="text/javascript" charset="utf-8"></script>
|
||||
<footer class="bg-dark">
|
||||
<div class="container">
|
||||
|
@ -126,7 +126,7 @@
|
||||
<div class="row text-center">
|
||||
<div><label>Date Range</label></div>
|
||||
<div class="input text-dark">
|
||||
<date-picker v-model="item.dateRange" range :placeholder="item.dateRange"></date-picker>
|
||||
<date-picker :lang="lang" v-model="item.dateRange" range placeholder="Date Range"></date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
@ -474,7 +474,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script src="https://unpkg.com/vue/dist/vue.min.js"></script>
|
||||
<script src="https://unpkg.com/vue2-datepicker/index.min.js"></script>
|
||||
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user