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

chore: update datepicker example #154

Merged
merged 1 commit into from
May 13, 2017
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
3 changes: 2 additions & 1 deletion 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 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
1 change: 1 addition & 0 deletions src/app/shared/documentation-items/documentation-items.ts
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