• 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)
  • 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

    Thread Starter andreas.kastl

    (@andreaskastl)

    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)
  • The topic ‘datepickeropts.value’ is closed to new replies.