Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div>
- <div flex-gt-xs>
- <md-datepicker ng-model="myDate" md-placeholder="Enter end date"
- md-min-date="minDate" md-max-date="maxDate" ng-change="send1()"></md-datepicker>
- </div>
- </div>
- <script>
- (function(scope) {
- scope.myDate = new Date();
- scope.minDate = new Date(
- scope.myDate.getFullYear(),
- scope.myDate.getMonth(),
- 15);
- scope.maxDate = new Date(
- scope.myDate.getFullYear(),
- scope.myDate.getMonth(),
- scope.myDate.getDate());
- })(scope);
- scope.send1 = function() {
- if (!this.msg) this.msg = {};
- if (!this.msg.payload) this.msg.payload = {};
- this.msg.payload = this.myDate;
- this.send(this.msg);
- }.bind(scope);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement