0
月のみを表示するdatepickerがあります。 現在の月のみが表示され、残りの月は無効にする必要があります。はdatepickerに現在の月のみを表示し、残りの月はangularjsを使用して無効にする必要があります
私はmin-date
とmax-date
で試しましたが、動作しません。
HTML:
<input type="text" class="form-control"
readonly="readonly" ng-model="xxxx"
min-mode="'month'" min-date="startmnth" max-date="endmnth"
datepicker-popup="yyyy-MM" is_open="status.date_opened"
ng-required="true" placeholder="YYYY-MM"
datepicker-options="datepickerOptions"
datepicker-mode="'month'" ng-click="openfromDate($event)"
show-button-bar="false">
JS:
$scope.startmnth = new Date().getMonth()
$scope.endmnth = new Date().getMonth()
$scope.datepickerOptions = {
startingDay: 1,
};
$scope.openfromDate = function ($event) {
$event.preventDefault();
$event.stopPropagation();
$scope.status.date_opened = true;
};
なぜ、タグを使用していないのですか?間違いなくあなたを助けるつもりです –