Why DateTimePicker is not cleanses your input?

0 like 0 dislike
5 views
When you open modelki with the form, set value in hidden input, as recommended by bootstrap. The data are substituted, but when you begin to choose the date of birth using the DateTimePicker, this data is cleared.
"$('#w1').on('show.bs.modal', function (event) { var button = $(event.relatedTarget); var vacancy = button.data('vacancy'); var modal = $(this); modal.find('.modal-body #candidate-uid_content').val(vacancy); modal.find('.modal-body #uid').val(vacancy); })"


Tried to substitute the data in the other fields directly when rendering forms and with js at the opening of modelki. Clears data only in the case when they are installed using the method above. If you put in drawing form, then not cleaned up. How to frame data to the picker didn't touch them?

A project on Yii2, I use kartik\\datetime\\DateTimePicker
by | 5 views

1 Answer

0 like 0 dislike
I have not found the cause of this behavior. Work if the value to specify as an attribute. Also, in principle, option.
modal.find('.modal-body #candidate-uid_content').attr({'value':vacancy});
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,901 users