in datepicker jquery if you write like this
$('.datepicker').datepicker({ onSelect : function (e) { $('.ui-datepicker-calendar tbody td').each( function () { if(-здесь проверяется совпадение нужного дня с текущим-){ $(this).css('background','#F94545'); } }) } }); then all the days that are needed are repainted in the desired background color, and then everything disappears, who knows how to fix it, please help with advice. At first, everything works exactly because if you display an alert, then for each alert you can see that the background changes on the desired dates, and when the alerts stop, the background disappears from red to the default one.