Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Just jQuery UI Widgets

    Look at your fields you have 2 ID’s on them, can only have 1. id=”haaheim_date_in” type=”text” class=”dato” id=”ankomstdato”

    Once you install the plugin and enable the datepicker plus al lthe required ones all the scripts are identical to the jQuery version found in jQuery UI. This example might not work for you but in the “Custom jQuery Code” box under the settings I added this: #CheckIn is the ID my first date box and #CheckOut is the ID of my second. Also you might need to change the dateFormat to you one prefer. The last lines I also included on how to set Sunday as the first day of the week for the calendar. Keep in mind that in WordPress you need to replace $ for the word jQuery when using code from jQuery UI. I was desperate for it to work so I actually enabled everything under “use These jQuery UI Scripts” and everything under “Use These jQuery Effect Scripts”

    jQuery( function() {
    var dateFormat = “dd-MM-yy”,
    from = jQuery( “#CheckIn” )
    .datepicker({
    defaultDate: “+1w”,
    changeMonth: true,
    numberOfMonths: 1
    })
    .on( “change”, function() {
    to.datepicker( “option”, “minDate”, getDate( this ) );
    }),
    to = jQuery( “#CheckOut” ).datepicker({
    defaultDate: “+1w”,
    changeMonth: true,
    numberOfMonths: 1
    })
    .on( “change”, function() {
    from.datepicker( “option”, “maxDate”, getDate( this ) );
    });

    function getDate( element ) {
    var date;
    try {
    date = jQuery.datepicker.parseDate( dateFormat, element.value );
    } catch( error ) {
    date = null;
    }
    return date;
    }
    } );

    jQuery( function() {
    var dateFormat = jQuery( “#CheckIn” ).datepicker( “option”, “dateFormat” );
    jQuery( “#CheckIn” ).datepicker( “option”, “dateFormat”, “dd-MM-yy” );
    var dateFormat = jQuery( “#CheckOut” ).datepicker( “option”, “dateFormat” );
    jQuery( “#CheckOut” ).datepicker( “option”, “dateFormat”, “dd-MM-yy” );

    //getter
    var firstDay = jQuery(‘#CheckIn’).datepicker(‘option’, ‘firstDay’);
    //setter
    jQuery(‘#CheckIn’).datepicker(‘option’, ‘firstDay’, 0);
    //getter
    var firstDay = jQuery(‘#CheckOut’).datepicker(‘option’, ‘firstDay’);
    //setter
    jQuery(‘#CheckOut’).datepicker(‘option’, ‘firstDay’, 0);

    WP Datepicker is an awesome plugin but I wasn’t able to do that so had to go with jQuery UI Widgets plugin in order to pull that off.

    Thread Starter FigmentDesign

    (@figmentdesign)

    Using your plugin for a booking engine. The link I gave you explains how date range works where you add a date to 1 calendar then then second calendar loads the same month with the past dates not selectable. Example I wish to book a hotel for Match 21st so I select 3/21 on first calendar when I do that the second calendar starts on March 21st with everything prior to March 21st un-selectable. Really just want to find the easiest method to using Arrival, Departure with you calendar. Didn’t really see any options for that and I read on an older comment from your team that this calendar supports that type. Also read something about a PRO needed but not sure if that was old so was trying to find out. Thank you for the quick response. Orestes – Figment Design.

    Having this same issue, recently updated to the latest version on WP, and now I cannot get the print page for any coupons, just get 404 not found. I reset the permalinks, I disabled all plugin including this one and re-enabled just this one. The only time is work partially is when I disable permalinks all together and still the page looks like a blog post instead of the print view for printing. This is a live site so I had to hide the print option via CSS temporarily. Coupon Link: http://airtreatmentinc.com/cctor_coupon/save-625-new/

    WP Version 3.8.1
    Coupon Creator Version 1.45

    Any Ideas what else I can try?

Viewing 6 replies - 1 through 6 (of 6 total)