bootstrap
bootstrap copied to clipboard
AngularJS Bootstrap UI datepicker-Choose month, no day-issues
Html:
<div id='chargedatepick'>
<input type="text" class="btn btn-default btn-sm bg-orange" datepicker-popup="yyyy-MM" ng-model="startDate"
style="width: 150px;height: 28px;"
datepicker-options="datepickerOptions"
ng-required="true" close-text="Close"
is-open="startopened"
ng-click="openstart($event)"/>
</div>
angularjs
$scope.startDate = new Date();
$scope.startopened = false;
$scope.datepickerOptions = {
datepickerMode: "month",
minMode: 'month',
};
$scope.openstart = function ($event) {
$event.preventDefault();
$event.stopPropagation();
$scope.startopened = true;
};
when the page reload and I‘m click the button ,it has to select the day,How can I get the currently open month when I‘m click the button at first?
@turs, please do not use the issues forum for support related requests. Rather, please follow the instructions here.