Answer the question
In order to leave comments, you need to log in
Why does the DateTimePicker clear non-its inputs?
When opening a modal with a form, I set the values to a hidden input as recommended by bootstrap. The data is substituted, but when I start to select 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);
})"
Answer the question
In order to leave comments, you need to log in
I did not find the reason for this behavior. Works if the value is specified as an attribute. Also, in principle, an option.
modal.find('.modal-body #candidate-uid_content').attr({'value':vacancy});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question