Answer the question
In order to leave comments, you need to log in
How to make in datetimepicker so that when you click on the calendar icon again, the calendar closes?
How to make in datetimepicker so that when you click on the calendar icon again, the calendar closes by analogy if you click on input?
I tried 2 options, but the calendar does not close when you click on the calendar icon:
$('.fa-calendar').on('click' ,function(){
// Первый вариант
if($(this).prev().not(':focus')) {
$(this).prev().trigger('focus');
} else {
$(this).prev().trigger('blur');
}
// второй вариант
if($(this).prev().not(':focus')) {
$(this).prev().focus();
}
else {
$(this).prev().blur();
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question