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

docs(calendar): add calendar demo #11295

Merged
merged 1 commit into from
May 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/components/datepicker/_demoCalendar/index.html

This file was deleted.

12 changes: 0 additions & 12 deletions src/components/datepicker/_demoCalendar/script.js

This file was deleted.

21 changes: 21 additions & 0 deletions src/components/datepicker/demoCalendar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<md-content ng-controller="AppCtrl as ctrl" layout="column" layout-gt-sm="row"
layout-padding ng-cloak>
<div layout="column" flex-order="1" flex-order-gt-sm="0">
<md-subheader>Start Date</md-subheader>
<md-calendar ng-model="ctrl.startDate"></md-calendar>
</div>
<div layout="column" flex-order="1" flex-order-gt-sm="1">
<md-subheader>End Date</md-subheader>
<md-calendar ng-model="ctrl.endDate"></md-calendar>
</div>
<div layout="column" flex-order="0" flex-order-gt-sm="2">
<md-subheader>Dates</md-subheader>
<div>
<label>Start</label>
<div>{{ctrl.startDate | date:shortDate}}</div>
</div>
<div><label>End</label>
<div>{{ctrl.endDate | date:shortDate}}</div>
</div>
</div>
</md-content>
5 changes: 5 additions & 0 deletions src/components/datepicker/demoCalendar/script.js
Original file line number Diff line number Diff line change
@@ -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);
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/** Demo styles for mdCalendar. */

md-calendar {
margin: 1px;
label {
font-size: x-small;
}