student birthdate validation

parent 824216d5
......@@ -18,6 +18,9 @@ dashboardControllers.controller('StudentSetupCtrl', function StudentSetupCtrl(
lodash,
ngToast) {
// For date validation
$scope.maxDate = new Date();
// For tab navigation (here too, if the user refresh the page...)
$scope.nav.tab = 'setup';
......
......@@ -136,7 +136,7 @@
<div class="form-group">
<label translate>birthdate</label>
<p class="input-group">
<input type="text" class="form-control" datepicker-popup=" {{ 'day_format' | translate }}" ng-model="formUser.birthdate" placeholder="{{ 'birthdate' | translate }}" is-open="opened" close-text="{{'close' | translate}}" required />
<input type="text" class="form-control" datepicker-popup=" {{ 'day_format' | translate }}" ng-model="formUser.birthdate" placeholder="{{ 'birthdate' | translate }}" is-open="opened" close-text="{{'close' | translate}}" max-date="maxDate" required />
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="openCalendar($event)"><i class="glyphicon glyphicon-calendar"></i></button>
</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment