У меня есть раскрывающийся список углового выбора с ng-параметрами и ng-моделью и двумя входными текстовыми полями. При выборе последней опции в раскрывающихся текстовых полях включены, которые по умолчанию отключены. Если я выбираю последнее значение в выпадающем меню текстовые поля вниз включены и при перезагрузке страницы я сделал условие, чтобы выбрать параметр с пустым значением. И когда я снова выбираю последний параметр, текстовые поля все еще находятся в отключенном режиме
Rangeslicer += "<div id='Rangeslicer"+id+"'>"
Rangeslicer += " <select class='selectpicker' id='rangepicker" + id + "' data-ng-change='RangeSelection(" + '"' + id + '"' + ")' ng-options='dayNames as dayNames.dayName for dayNames in RangeSelector' style='border-radius:5px;height:25px;outline:0px;text-align:center'>"
// Rangeslicer += " <select id='rangepicker" + id + "' ng-options='dayNames.id as dayNames.dayName for dayNames in RangeSelector' style='border-radius:20px;height:25px;outline:0px;text-align:center' ng-model='rangepicker" + id + "'>"
Rangeslicer += " <option value=''>Select Date Range</option>"
Rangeslicer += "</select> <br/>"
Rangeslicer += " <div id='custominput' style='margin-top:4%'><input type='text' class='daterangecustom" + id + " datecustom' id='customstart" + id + "' disabled ng-model='customstart' style='height:25px;border-radius:5px;width:35%;margin-right:10%;margin-left:3%;text-align:center;outline:0px'/><input type='text' class='daterangecustom" + id + " datecustom' id='customend" + id + "' disabled ng-model='customend' ng-mouseleave='compareDates(" + '"' + id + '"' + ")' style='border-radius:5px;width:35%;height:25px;text-align:center;outline:0px'/></br><p id='errormessage" + id + "' style='display:none;margin-bottom:0px'>Please ensure that the End Date is greater than or equal to the Start Date.</p></div></div>"
//$compile($('#Rangeslicer').empty())($scope);
// $compile($("#divChk" + id).empty())($scope);
$compile($("#main" + id).append(Rangeslicer))($scope);
$('select.selectpicker option:first').prop('selected', true);
На самом деле, когда опция изменена на последнее значение, текстовые поля должны включать