Support » Plugin: Date Time Picker Field » datepickeropts.value

  • Resolved andreas.kastl

    (@andreaskastl)


    I’m not so familar with java – you told me I can change the value with this line:
    datepickeropts.value = ’12/14/2019 15:00′;

    I have in my form two datepickers, one for starttime one for endtime.
    How can I add a class or ID to this “datepickeropts.value = ’12/14/2019 15:00′;” that only the #starttime will be changed?

    Many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Carlos Moreira

    (@carlosmoreirapt)

    Hi @andreaskastl the plugin only supports ‘one’ date/time picker field, meaning that although you can have multiple picker fields, the settings will apply to all of them the same way.

    So this is a bit outside of the support I can give, but in this case you should rely on normal jQuery code to set values to your fields:
    jQuery('#starttime').val('12/14/2019 15:00');
    Something like this.
    Hope it helps.
    Greetings, Carlos

    Hi Carlos!

    Thank you for your help.

    I got it work with this function (If someone has the same “problem”):

        
    startzeit = '2019-12-12 13:00';
    endzeit = '2019-12-12 17:00';
    jQuery(function($) {
        $("#wpuf-date-_EventStartDate").datetimepicker({ value: startzeit });
        $("#wpuf-date-_EventEndDate").datetimepicker({ value: endzeit });
    });
    

    Greetings, Andy

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.