1

I am trying to setup a booking form with 2 datepickers, one is checkin the other one is checkout. I have no problem having 2 datepickers functional with the mobile style independantly I have no problem having them functional restricting each other as per this solution:

var dateToday = new Date();
var dates = $("#from, #to").datepicker({
    defaultDate: "+1w",
    changeMonth: true,
    numberOfMonths: 3,
    minDate: dateToday,
    onSelect: function(selectedDate) {
        var option = this.id == "from" ? "minDate" : "maxDate",
            instance = $(this).data("datepicker"),
            date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
        dates.not(this).datepicker("option", option, date);
    }
});

But when I restrict them I loose the mobile styling. How can I have the best of both worlds, functional and styled?

Thank you!

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.