Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • kjetilwaage

    (@kjetilwaage)

    I have the same problem with 3 columns
    Resizable thumbnails is set to “Yes”

    https://vestbris.no/tjenester/gallery-demo/

    Thread Starter kjetilwaage

    (@kjetilwaage)

    Thanks!
    Can you please send me a mail to: kjetil(a)vestbris.no ?
    You can help me directly on my site if it’s possible?

    Thread Starter kjetilwaage

    (@kjetilwaage)

    No, still not working…
    A little help would have been fantastic! ??

    Thread Starter kjetilwaage

    (@kjetilwaage)

    Sorry, can’t get it to work! ??
    I think i might look for another solution?

    Your code that i added in Custom jQuery Code:
    jQuery( function() {
    var dateFormat = “dd.mm.yy”,
    from = jQuery( “#haaheim_date_in” )
    .datepicker({
    defaultDate: “+1w”,
    changeMonth: true,
    numberOfMonths: 1
    })
    .on( “change”, function() {
    to.datepicker( “option”, “minDate”, getDate( this ) );
    }),
    to = jQuery( “#haaheim_date_out” ).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( “#haaheim_date_in” ).datepicker( “option”, “dateFormat” );
    jQuery( “#haaheim_date_in” ).datepicker( “option”, “dateFormat”, “dd.mm.yy” );
    var dateFormat = jQuery( “#haaheim_date_out” ).datepicker( “option”, “dateFormat” );
    jQuery( “#haaheim_date_out” ).datepicker( “option”, “dateFormat”, “dd.mm.yy” );

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

    My input fields in my form:
    <div class=”con”>
    <label for=”ankomstdato”>Ankomstdato</label><input id=”haaheim_date_in” type=”text” class=”dato” name=”arrive” /></div>

    <div class=”con”>
    <label for=”avreisedato”>Avreisedato</label><input id=”haaheim_date_out” type=”text” class=”dato” name=”depart” /></div>

    Thread Starter kjetilwaage

    (@kjetilwaage)

    ok, sorry..
    I’ve tried to remove the second id’s, still not working.
    I don’t think i understand this? :p

    Do i use WP Datepicker and jQuery UI Widgets plugin together or just jQuery UI Widgets plugin alone?

    Link to test form: https://www.haaheimgaard.no/test_date/

    Thread Starter kjetilwaage

    (@kjetilwaage)

    ok, thanks! ??
    I tried but no luck ??

    Here is your code edited:
    jQuery( function() {
    var dateFormat = “dd.mm.yy”,
    from = jQuery( “#haaheim_date_in” )
    .datepicker({
    defaultDate: “+1w”,
    changeMonth: true,
    numberOfMonths: 1
    })
    .on( “change”, function() {
    to.datepicker( “option”, “minDate”, getDate( this ) );
    }),
    to = jQuery( “#haaheim_date_out” ).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( “#haaheim_date_in” ).datepicker( “option”, “dateFormat” );
    jQuery( “#haaheim_date_in” ).datepicker( “option”, “dateFormat”, “dd.mm.yy” );
    var dateFormat = jQuery( “#haaheim_date_out” ).datepicker( “option”, “dateFormat” );
    jQuery( “#haaheim_date_out” ).datepicker( “option”, “dateFormat”, “dd.mm.yy” );

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

    And my input fields:
    <div class=”con”>
    <label for=”ankomstdato”>Ankomstdato</label><input id=”haaheim_date_in” type=”text” class=”dato” id=”ankomstdato” name=”arrive” />
    </div>

    <div class=”con”>
    <label for=”avreisedato”>Avreisedato</label><input id=”haaheim_date_out” type=”text” class=”dato” id=”avreisedato” name=”depart” />
    </div>

    • This reply was modified 5 years, 9 months ago by kjetilwaage.
    Thread Starter kjetilwaage

    (@kjetilwaage)

    Thanks!
    Do you have ab example and info how to do this?

    Thread Starter kjetilwaage

    (@kjetilwaage)

    Hey!
    Thanks for adding the if condition ??
    Tried to fix the email field with your code, but did not make it work?

    I think this is possible with at simple javascript?
    I will try to explain it again.

    Look here: https://www.vestbris.no/emabestilling/
    I have a dropdown menu with a list of names and i have a email field that the user have to type in their email every time they post a order.
    My users are lazy and do not bother to enter their e-mail whenever they have to send an order.
    So when a user pick their name from the list i want the email field to automaticly put in their email adress.

    Thanks ??

    Thread Starter kjetilwaage

    (@kjetilwaage)

    Thanks!
    Where do i add this code ?

    Thread Starter kjetilwaage

    (@kjetilwaage)

    Thanks!
    1. Ok, then I see and see what’s coming later

    2. Yes I thought maybe something like that would work.
    How do i make the formula ?

    Thread Starter kjetilwaage

    (@kjetilwaage)

    Thanks for replay!
    Was not exactly what I was thinking about.
    I will try to explain a little better.

    1. If a person leaves a field blank, eg “Address:” (see image)
    I want this line hidden in the email.
    Could maybe be done like this?

    [if field adresse]
    Adresse: [field adresse]
    [/field adresse]

    form

    2. Yes almost ??
    I want to change “From email address” field depending on what they select in the dropdown

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