Hi Gavick,
I have a question: is it possible to put in a room's calendar the days already reserved in a simple way?
Thanks
Indo
Piotr Kunicki wrote:Hi,
We've checked the Solidres plugin for WordPress first and there were a lot of issues with it. (it's a beta version), so we've decided to create own (very simple) plugin for reservation. Maybe you should wait for the next version of Solidress, because it will be really difficult to fix these issues.
onSelect: function() {
$(".gk-hotel-reservation-form input[name='gk-checkout']").val($.datepicker.formatDate("yy-mm-dd", $(this).datepicker("getDate")));
$(".gk-hotel-reservation-form .checkout_module").text($.datepicker.formatDate("dd/mm/yy", $(this).datepicker("getDate")));
$(".gk-hotel-reservation-form .checkout_datepicker_inline_module").slideToggle();
$(".gk-hotel-reservation-form .checkin_module").removeClass("disabledCalendar");
}
onSelect: function() {
$(".gk-hotel-reservation-form input[name='gk-checkout']").val($.datepicker.formatDate("yy-mm-dd", $(this).datepicker("getDate")));
$(".gk-hotel-reservation-form .checkout_module").text($.datepicker.formatDate("dd/mm/yy", $(this).datepicker("getDate")));
$(".gk-hotel-reservation-form .checkout_datepicker_inline_module").slideToggle();
$(".gk-hotel-reservation-form .checkin_module").removeClass("disabledCalendar");
// custom hotelRSV code //
var selectedCheckoutDate = $.datepicker.formatDate("yymmdd", $(this).datepicker("getDate"));
$('#rsvWidgetButton').attr('data-hotelrsv-dt-departure', selectedCheckoutDate);
// end custom hotelRSV code //
}
onSelect : function() {
var currentSelectedDate = $(this).datepicker("getDate");
var checkoutMinDate = $(this).datepicker("getDate", "+1d");
checkoutMinDate.setDate(checkoutMinDate.getDate() + minLengthOfStay);
checkout.datepicker( "option", "minDate", checkoutMinDate );
checkout.datepicker( "setDate", checkoutMinDate);
$(".gk-hotel-reservation-form input[name='gk-checkin']").val($.datepicker.formatDate("yy-mm-dd", currentSelectedDate));
$(".gk-hotel-reservation-form input[name='gk-checkout']").val($.datepicker.formatDate("yy-mm-dd", checkoutMinDate));
$(".gk-hotel-reservation-form .checkin_module").text($.datepicker.formatDate("dd/mm/yy", currentSelectedDate));
$(".gk-hotel-reservation-form .checkout_module").text($.datepicker.formatDate("dd/mm/yy", checkoutMinDate));
$(".gk-hotel-reservation-form .checkin_datepicker_inline_module").slideToggle();
$(".gk-hotel-reservation-form .checkout_module").removeClass("disabledCalendar");
},
onSelect : function() {
var currentSelectedDate = $(this).datepicker("getDate");
var checkoutMinDate = $(this).datepicker("getDate", "+1d");
checkoutMinDate.setDate(checkoutMinDate.getDate() + minLengthOfStay);
checkout.datepicker( "option", "minDate", checkoutMinDate );
checkout.datepicker( "setDate", checkoutMinDate);
$(".gk-hotel-reservation-form input[name='gk-checkin']").val($.datepicker.formatDate("yy-mm-dd", currentSelectedDate));
$(".gk-hotel-reservation-form input[name='gk-checkout']").val($.datepicker.formatDate("yy-mm-dd", checkoutMinDate));
$(".gk-hotel-reservation-form .checkin_module").text($.datepicker.formatDate("dd/mm/yy", currentSelectedDate));
$(".gk-hotel-reservation-form .checkout_module").text($.datepicker.formatDate("dd/mm/yy", checkoutMinDate));
$(".gk-hotel-reservation-form .checkin_datepicker_inline_module").slideToggle();
$(".gk-hotel-reservation-form .checkout_module").removeClass("disabledCalendar");
// custom hotelRSV code //
var selectedCheckInDate = $.datepicker.formatDate("yymmdd", currentSelectedDate);
$('#rsvWidgetButton').attr('data-hotelrsv-dt-arrival', selectedCheckInDate);
var checkoutDate = checkout.datepicker("getDate");
checkoutDate = $.datepicker.formatDate("yymmdd", checkoutDate);
$('#rsvWidgetButton').attr('data-hotelrsv-dt-departure', checkoutDate);
// end custom hotelRSV code //
},
$(".gk-hotel-reservation-form .checkout_module").click(function() { // custom hotelRSV code //
var initialCheckInDate = $.datepicker.formatDate("yymmdd", checkin.datepicker("getDate"));
$('#rsvWidgetButton').attr('data-hotelrsv-dt-arrival', initialCheckInDate);
var initialCheckoutDate = $.datepicker.formatDate("yymmdd", checkout.datepicker("getDate"));
$('#rsvWidgetButton').attr('data-hotelrsv-dt-departure', initialCheckoutDate);
// end custom hotelRSV code //
$(".gk-hotel-reservation-form .checkout_module").click(function() { ...
$output .= '<input type="button" value="'.__('Make reservation', 'gk-hotel-reservation').'" class="gk-hotel-reservation-make-btn" />';
$output .= '<input id="rsvWidgetButton" type="button" value="'.__('Make reservation', 'gk-hotel-reservation').'" class="rsv-app-launcher rsv-mobile-launcher" />';
