Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bajro17's avatar

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.

0 likes
5 replies
topvillas's avatar

What do you need help with? Just use VueResource to make an AJAX call to the server.

bajro17's avatar

I want first show form for choosing date than when client choose date to show list of available time to first form disappear

topvillas's avatar
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.

bajro17's avatar

just controllers to check date and time available

Please or to participate in this conversation.