date reimplemented
authoraditya-nambiar <aditya.nambiar007@gmail.com>
Sun, 15 Jun 2014 21:38:49 +0000 (17:38 -0400)
committeraditya-nambiar <aditya.nambiar007@gmail.com>
Sat, 26 Jul 2014 04:48:15 +0000 (10:18 +0530)
js/angular-crmMailingAB.js
partials/abtesting/helloworld.html

index d812542ed67046bccd182aba25c8b6a35ec15998..b73c274000f167ae895f4ba2b2e194c3a57a24eb 100644 (file)
@@ -89,6 +89,7 @@
             $scope.ifyes=false;
         };
 
+        $scope.send_date ="10/4/2004";
 
 
     });
 
     });
 
+    crmMailingAB.directive('datepick',function(){
+
+        return {
+            scope :{
+                foo : '=send_date'
+            },
+
+
+          restrict: 'AE',
+
+
+            link: function(scope,element,attrs){
+
+                $(element).datepicker({
+                    onSelect: function(date) {
+                        $(".ui-datepicker a").removeAttr("href");
+                        scope.foo =date;
+                        console.log(date);
+                    }
+                });
+            }
+        };
+
+
+    });
+
 
 
 
index aa866c35b6799f838a29a5bb365f19e656625c30..f78c3fb4595833508c0caa3816f842ceb50593f9 100644 (file)
             <input type="radio" name="Start" ng-model="start" value="now"> Now &nbsp
             <input type="radio" name="Start" ng-model="start" value="later"> Later
 
-            &nbsp &nbsp <input type="date" ng-show="start=='later'" ng-model="send_date">
+            &nbsp &nbsp <input type="date" ng-show="start=='later'" ng-model="send_date" datepick>
             </div>
+
+            
             <br><br>
 
             <button    id="campaignbutton" nexttab={{adi}} >Submit & Send</button> <br>