V
V
Vladimir Golub2018-06-14 01:49:41
JavaScript
Vladimir Golub, 2018-06-14 01:49:41

How in Vue to react to changes in value made via jQuery?

There is a field with datetimepicker (jQuery plugin). After using it, the date value appears in the field, but watch (Vue) does not react to it.
I created a hidden field in which I enter the value in the value attribute using jQuery. Again watch does not respond.

<input class="form-control form-control-sm datetimepicker" id="selectDateStart" value="" type="text" aria-describedby="selectDate"/>
<div class="input-group-append"><span class="input-group-text"><i class="far fa-calendar-alt"></i></span></div>
<input type="hidden" id="dateStart" v-model="filterParam.dateStart">


$('.datetimepicker').datetimepicker({
              format: 'dd.mm.yyyy hh:ii:ss',
              autoclose:true,
              language: 'ru'
          })
          .on('changeDate', function(ev) {
              var value = $("#selectDateStart").val();
              $("#dateStart").attr("value", value)
          });


How to be in this situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lemme, 2018-06-14
@RazerVG

Need to dispatch the event...
jsfiddle.net/yzL80jpx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question