1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
myappApp.controller("CreationCommandeController", ['$scope', '$filter','$q', "NotificationService","DossierPService","CreationCommandeService", "CommandeProduitManager","UtilService", "$timeout","ItemService","MultilingueService","CommandeBinauralService",
function($scope, $filter, $q,NotificationService, DossierPService, CreationCommandeService, CommandeProduitManager, UtilService, $timeout, ItemService,MultilingueService,CommandeBinauralService){
$scope.codeRemplacement = MultilingueService.mlTypeCommandeRemplacement;
....
.....
$scope.validDateCommande = function(){
if(new Date($scope.Commande.date) > new Date())
$scope.Commande.date = $filter('date')(new Date(),"yyyy-MM-dd");
else if(new Date($scope.Commande.date) < tempDate)
$scope.Commande.date = $filter('date')(tempDate, "yyyy-MM-dd");
} |
Partager