From 97c470dcc0c2e7afd1f5649688a7d7d69090987b Mon Sep 17 00:00:00 2001 From: Michael Prentice Date: Wed, 23 May 2018 17:27:32 -0400 Subject: [PATCH] docs(calendar): add calendar demo this is needed as there are some bugs in this area it needs to be easier to submit reproductions --- .../datepicker/_demoCalendar/index.html | 8 ------- .../datepicker/_demoCalendar/script.js | 12 ----------- .../datepicker/demoCalendar/index.html | 21 +++++++++++++++++++ .../datepicker/demoCalendar/script.js | 5 +++++ .../style.css => demoCalendar/style.scss} | 5 ++--- 5 files changed, 28 insertions(+), 23 deletions(-) delete mode 100644 src/components/datepicker/_demoCalendar/index.html delete mode 100644 src/components/datepicker/_demoCalendar/script.js create mode 100644 src/components/datepicker/demoCalendar/index.html create mode 100644 src/components/datepicker/demoCalendar/script.js rename src/components/datepicker/{_demoCalendar/style.css => demoCalendar/style.scss} (55%) diff --git a/src/components/datepicker/_demoCalendar/index.html b/src/components/datepicker/_demoCalendar/index.html deleted file mode 100644 index 113dc763dfa..00000000000 --- a/src/components/datepicker/_demoCalendar/index.html +++ /dev/null @@ -1,8 +0,0 @@ -
- -

{{title}}

- - - -
-
diff --git a/src/components/datepicker/_demoCalendar/script.js b/src/components/datepicker/_demoCalendar/script.js deleted file mode 100644 index d4e813d1cf2..00000000000 --- a/src/components/datepicker/_demoCalendar/script.js +++ /dev/null @@ -1,12 +0,0 @@ -angular.module('calendarDemo1', ['ngMaterial']) - .controller('AppCtrl', function($scope) { - $scope.title = 'Calendar demo'; - $scope.myDate = new Date(); - - $scope.adjustMonth = function(delta) { - $scope.myDate = new Date( - $scope.myDate.getFullYear(), - $scope.myDate.getMonth() + delta, - $scope.myDate.getDate()); - }; - }); diff --git a/src/components/datepicker/demoCalendar/index.html b/src/components/datepicker/demoCalendar/index.html new file mode 100644 index 00000000000..cdab2602363 --- /dev/null +++ b/src/components/datepicker/demoCalendar/index.html @@ -0,0 +1,21 @@ + +
+ Start Date + +
+
+ End Date + +
+
+ Dates +
+ +
{{ctrl.startDate | date:shortDate}}
+
+
+
{{ctrl.endDate | date:shortDate}}
+
+
+
diff --git a/src/components/datepicker/demoCalendar/script.js b/src/components/datepicker/demoCalendar/script.js new file mode 100644 index 00000000000..5bc135e4c03 --- /dev/null +++ b/src/components/datepicker/demoCalendar/script.js @@ -0,0 +1,5 @@ +angular.module('calendarDemo', ['ngMaterial']).controller('AppCtrl', function() { + this.startDate = new Date(); + this.endDate = new Date(); + this.endDate.setDate(this.endDate.getDate() + 5); +}); diff --git a/src/components/datepicker/_demoCalendar/style.css b/src/components/datepicker/demoCalendar/style.scss similarity index 55% rename from src/components/datepicker/_demoCalendar/style.css rename to src/components/datepicker/demoCalendar/style.scss index cc979174937..7e87a89668a 100644 --- a/src/components/datepicker/_demoCalendar/style.css +++ b/src/components/datepicker/demoCalendar/style.scss @@ -1,5 +1,4 @@ /** Demo styles for mdCalendar. */ - -md-calendar { - margin: 1px; +label { + font-size: x-small; }