html
<form name="eventInformation" id="eventInformation"><label class="required"> Occurence Date </label>
<p class="input-group">
<input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="formData_EventDetails.eventOccurDate"
is-open="popup[0].opened" datepicker-options="dateOptions" close-text="Close" required/>
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open(0)"><i class="glyphicon glyphicon-calendar"></i></button>
</span>
</p>
<div class="col-sm-2 pull-right">
<button class="btn btn-block btn-primary ebtn"
ng-disabled="eventInformation.$invalid"
ng-click="submit()">Save</button>
</div>
</form>
javascript
$scope.format = 'yyyy/MM/dd';
$scope.dateOptions = {
formatYear : 'yy',
startingDay : 1
};
$scope.popup = [];
for (i = 0; i < 10; i++) {
$scope.popup[i] = {
opened : false
};
}
$scope.open = function(i) {
$scope.popup[i].opened = true;
};
I have bootstrap datepicker element which i am trying to only accept date as input, but it accepts all kinds of inputs i.e. string, numbers etc. How can i limit so it only takes date as input