Support

Account

Home Forums Front-end Issues How can I manually change a datetime picker value

Solved

How can I manually change a datetime picker value

  • I have a hidden datetime field in a repeater. When a repeater row is duplicated, I would like to change the datetime value. I have tried using acf.getField and then setting
    field.val( new-date-string)
    also
    jQueryElement.attr('value', new-date-string)
    and
    jQueryElement.val(new-date-string)
    finally
    jQueryElement.datepicker('setDate', new-date-string)
    none of these seem to alter the datetime value. I’m assuming maybe I’m accessing the wrong element but I’m not sure which one I should get?

  • Thinking about this over the weekend this is a dumb design decision on my part. Just need a text field.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.