Vue booking Hi, I need help with vue.js how to make booking form, first to I check date when I click it to site run query check available times and show me on same page.
What do you need help with? Just use VueResource to make an AJAX call to the server.
I want first show form for choosing date than when client choose date to show list of available time to first form disappear
What have you done already?
var app = new Vue({
el: 'body',
data: {
date: null,
events: []
},
methods: {
submit: function() {
Vue.$http('resourceUrl', {date: this.date), function(reply) {
this.events = reply;
this.date = null;
});
}
}
})
Bind the date to your input with v-model and the events to a ul with a v-for.
just controllers to check date and time available
Please sign in or create an account to participate in this conversation.