Commit dedf5d3b authored by EXT Hélène David's avatar EXT Hélène David
Browse files

added restriction to begining date

parent 36f0e680
......@@ -25,7 +25,7 @@
<div class="form-group">
<label for="inputType">{{::_labels.typeEvent}}</label>
<select type="text" id="inputType" ng-model="newEventCtrl.newEvent.type" ng-options="model.name for model in newEventCtrl.eventTypes"></select>
</div>
</div>
<div class="form-group has-error row">
<div class="col-md-6">
<label for="inputDate">{{::_labels.beginDate}}</label><span class="required-item"> *</span>
......
......@@ -16,7 +16,6 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
newEventCtrl.steps = [1,2];
newEventCtrl.newEvent = {title:"",fixedDate:1};
newEventCtrl.newEvent.commonDates = [{id:1,value:""}];
newEventCtrl.newEvent.url = $scope._urls.root+"#/e/"+$scope._hashCode(newEventCtrl.shortName+(new Date()).getTime(),10)
......@@ -47,11 +46,11 @@ root.controller('EventNewCtrl', ['$scope','$http' ,'$stateParams','$eventsFactor
newEventCtrl.newEvent.type = newEventCtrl.eventTypes[0];
}
$("#myDate" ).datepicker({dateFormat: 'yy-mm-dd',onSelect: function(date) {
$("#myDate" ).datepicker({dateFormat: 'yy-mm-dd', minDate: 0, onSelect: function(date) {
$scope.$apply();
newEventCtrl.newEvent.myDate = $("#myDate" ).val();
}});
$("#myDateEnd" ).datepicker({dateFormat: 'yy-mm-dd',onSelect: function(date) {
}});
$("#myDateEnd" ).datepicker({dateFormat: 'yy-mm-dd', onSelect: function(date) {
$scope.$apply();
newEventCtrl.newEvent.myDateEnd = $("#myDateEnd" ).val();
}});
......
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 to comment