Skip to content

Commit

Permalink
chore: update datepicker example (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
kara authored May 13, 2017
1 parent 7c1171e commit bbf96f1
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 1 deletion.
3 changes: 2 additions & 1 deletion material.angular.io/src/app/app-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {NgModule} from '@angular/core';
import {Location, LocationStrategy, PathLocationStrategy} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';
import {MaterialModule} from '@angular/material';
import {MaterialModule, MdNativeDateModule} from '@angular/material';
import {MaterialDocsApp} from './material-docs-app';
import {Homepage} from './pages/homepage/homepage';
import {routing} from './routes';
Expand Down Expand Up @@ -42,6 +42,7 @@ import {ComponentPageHeader} from './pages/component-page-header/component-page-
FormsModule,
HttpModule,
MaterialModule,
MdNativeDateModule,
routing,
],
providers: [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/** No CSS for this example */
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<md-input-container>
<input mdInput [mdDatepicker]="picker" placeholder="Choose a date">
<button mdSuffix [mdDatepickerToggle]="picker"></button>
</md-input-container>
<md-datepicker #picker></md-datepicker>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {Component} from '@angular/core';


@Component({
selector: 'datepicker-overview-example',
templateUrl: './datepicker-overview-example.html',
styleUrls: ['./datepicker-overview-example.css'],
})
export class DatepickerOverviewExample {}
3 changes: 3 additions & 0 deletions material.angular.io/src/app/examples/example-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import {SelectOverviewExample} from './select-overview/select-overview-example';
import {ChipsOverviewExample} from './chips-overview/chips-overview-example';
import {ChipsStackedExample} from './chips-stacked/chips-stacked-example';
import {SelectFormExample} from './select-form/select-form-example';
import {DatepickerOverviewExample} from './datepicker-overview/datepicker-overview-example';


export interface LiveExample {
Expand Down Expand Up @@ -99,6 +100,7 @@ export const EXAMPLE_COMPONENTS = {
'card-overview': {title: 'Basic cards', component: CardOverviewExample},
'checkbox-configurable': {title: 'Configurable checkbox', component: CheckboxConfigurableExample},
'checkbox-overview': {title: 'Basic checkboxes', component: CheckboxOverviewExample},
'datepicker-overview': {title: 'Basic datepicker', component: DatepickerOverviewExample},
'dialog-overview': {
title: 'Basic dialog',
component: DialogOverviewExample,
Expand Down Expand Up @@ -182,6 +184,7 @@ export const EXAMPLE_LIST = [
ChipsStackedExample,
CheckboxConfigurableExample,
CheckboxOverviewExample,
DatepickerOverviewExample,
DialogOverviewExample,
DialogOverviewExampleDialog,
DialogResultExample,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const DOCS = [
items: [
{id: 'autocomplete', name: 'Autocomplete', examples: ['autocomplete-overview']},
{id: 'checkbox', name: 'Checkbox', examples: ['checkbox-configurable']},
{id: 'datepicker', name: 'Datepicker', examples: ['datepicker-overview']},
{id: 'input', name: 'Input', examples: ['input-form']},
{id: 'radio', name: 'Radio button', examples: ['radio-ng-model']},
{id: 'select', name: 'Select', examples: ['select-form']},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/** No CSS for this example */
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<md-input-container>
<input mdInput [mdDatepicker]="picker" placeholder="Choose a date">
<button mdSuffix [mdDatepickerToggle]="picker"></button>
</md-input-container>
<md-datepicker #picker></md-datepicker>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {Component} from '@angular/core';


@Component({
selector: 'datepicker-overview-example',
templateUrl: './datepicker-overview-example.html',
styleUrls: ['./datepicker-overview-example.css'],
})
export class DatepickerOverviewExample {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {Component} from '@angular/core';

@Component({
selector: 'list-sections-example',
styleUrls: ['./list-sections-example.css'],
templateUrl: './list-sections-example.html',
})
export class ListSectionsExample {
Expand Down

0 comments on commit bbf96f1

Please sign in to comment.