Angular -ui bootstrap datepicker (how to disable only the button today when popup)

I have 2 dates: StartDate and EndDate using angular -ui-bootstrap datepicker

When I select startDate (more than today's date), I set the minimum dateicker EndDate date to startDate. Thus, all dates <= startDate are disabled.

But the Today button in the EnDate pop-up window can set today's date that does not comply with the business rule.

Is there a way to disable the Today button without disabling all the buttons?

+4
source share
2 answers
0

HTMl :

ng-model, ng-change min-date

<input type="text" uib-datepicker-popup="dd/MM/yyyy" ng-model="personForm.StartDate" name="startDate" ng-change="myStartDateChange()" />

<input type="text" uib-datepicker-popup="dd/MM/yyyy" min-date="endmindate" ng-model="personForm.EndDate" name="endDate" />

:

 $scope.myStartDateChange = function () {            
        $scope.endmindate= $scope.personForm.StartDate;
    }
0

Source: https://habr.com/ru/post/1542590/


All Articles