Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
feat(calendar): starting work for date-picker.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelbourn committed Aug 13, 2015
1 parent b1f6e1a commit 7b70d74
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/components/calendar/demoBasicUsage/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<div ng-controller="AppCtrl" style='padding: 40px;'>
<md-content>
<h1>{{title}}</h1>

<hr>
<p>
<h2>Development tools</h2>
<button type="button" ng-click="adjustMonth(+1)">Next month</button>
<button type="button" ng-click="adjustMonth(-1)">Prev month</button>
<input type="date" ng-model="myDate">
</p>
<hr>

<md-calendar ng-model="myDate"></md-calendar>

<br><br>
<br><br>
<br><br>
<p>Here is a bunch of stuff after the calendar</p>
<p>Here is a bunch of stuff after the calendar</p>
<p>Here is a bunch of stuff after the calendar</p>
<p>Here is a bunch of stuff after the calendar</p>
<p>Here is a bunch of stuff after the calendar</p>
<p>Here is a bunch of stuff after the calendar</p>
<input>

</md-content>
</div>
12 changes: 12 additions & 0 deletions src/components/calendar/demoBasicUsage/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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());
};
});
1 change: 1 addition & 0 deletions src/components/calendar/demoBasicUsage/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/** Demo styles for mdCalendar. */

0 comments on commit 7b70d74

Please sign in to comment.