dateRangePicker在模型中不起作用? 我正在使用bootStarp3,angularJs和jquery 我的问题无法在模型弹出窗口中获取daterangepicker 注意:相同的代码可正常显示HTML页面
JS Code:
$scope.Seasons = ["SS", "AW"];
$scope.Years = ["2017", "2018", "2019", "2020", "2021", "2022", "2023"];
$rootScope.fileUploadmodalInstanceForSeasonUpdate = $uibModal.open({
templateUrl: '/resources/pages/retail/templates/seasonDates.html',
backdrop: false,
scope: $scope,
controller: function($scope, $uibModalInstance) {
$('#planingDates').daterangepicker({
"showDropdowns": true,
"showWeekNumbers": true,
"startDate": new Date(),
"endDate": new Date(),
"opens": "center",
"linkedCalendars": true,
"autoUpdateInput": true,
"showCustomRangeLabel": true,
"alwaysShowCalendars": true
}, function(start, end, label) {
console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
});
}
})
.datepicker {
z-index: 9999999;
}
<div class="modal-body">
<form name="seasonUpdate" novalidate ng submit="saveSeasonInformation(this)">
<div class="row">
<label class="col-sm-1">Season</label>
<div class="col-sm-4">
<select class="btn btn-default dropdown-toggle form-control" ng-model="seletedSeason" ng-options="brand for brand in Seasons" required>
<option value="">-- select Season --</option>
</select>
</div>
<div class="col-sm-4" style="padding-top: 12px;">
<input ng-disabled="!seletedSeason" style="z-index: 10510;" type="text" id="planingDates" class="form-control">
</div>
<label class="col-sm-1">Year</label>
<div class="col-sm-2">
<select class="btn btn-default dropdown-toggle form-control" ng-model="seletedYear" ng-options="brand for brand in Years" required>
<option value="">-- select Years --</option>
</select>
</div>
<div class="col-sm-2">
<button class="btn btn-primary" type="submit">Run</button>
</div>
</div>
</form>
</div>
我也尝试过:
.datepicker {
z-index: 9999999;
}
请让我知道问题