Does Not Work Datepicker (bootstrap)?
To be displayed in the input - calendar (datepicker (Bootstrap)). The problem is that in the former case, it appears: -provide="datepicker"]').datepicker();
// Append New Input field
$("div.modal-body").append(" <input type=\"text\" class=\"datepicker_goal_modal\" data-provide=\"datepicker_modal\" placeholder=\"Period\">")
// After appending, call datepicker on input field.
$('.modal-body input[data-provide="datepicker_modal"]').datepicker();
Solution 2:
$('body').on('focus', '.datepicker_goal_modal', function(){
$(this).datepicker();
});
This should work. The reason it would not appear before is because you are dynamically creating the modal, and the element selector function only works on elements that existed when the page first loaded.
Post a Comment for "Does Not Work Datepicker (bootstrap)?"