Commit 92ee4244 authored by Anthony Geourjon's avatar Anthony Geourjon
Browse files

Merge branch 'EDCAMPUS-8-formulaire-tache' into 'master'

Edcampus 8 formulaire tache

See merge request !3
parents 9dfd8e15 126ef933
......@@ -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,13 @@ 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) {
}, onClose : function(date) {
$("#myDateEnd" ).datepicker("option", "minDate", date);
}});
$("#myDateEnd" ).datepicker({dateFormat: 'yy-mm-dd', onSelect: function(date) {
$scope.$apply();
newEventCtrl.newEvent.myDateEnd = $("#myDateEnd" ).val();
}});
......
......@@ -78,7 +78,7 @@ function DateController($utilsFactory,$element,$timeout) {
var dateElement = $element.find('input');
$timeout(function(){
var t =$(dateElement ).datepicker({dateFormat: 'yy-mm-dd',onSelect: function(date) {
var t =$(dateElement ).datepicker({dateFormat: 'yy-mm-dd', minDate: 0, onSelect: function(date) {
console.log("on sélectionne");
ctrl.selectedDate = $(dateElement).val();
console.log(ctrl.selectedDate);
......
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