Skip to content

Commit

Permalink
docs(datepicker): decompose Basic demo (remove presetting dates for d…
Browse files Browse the repository at this point in the history
…atepicker and daterangepicker)
  • Loading branch information
svetoldo4444ka committed Feb 9, 2018
1 parent 465ed0d commit db1a4df
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 56 deletions.
22 changes: 5 additions & 17 deletions demo/src/app/components/+datepicker/datepicker-section.list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DemoDatePickerPopupComponent } from './demos/bs-popup/date-picker-popup';
import { DemoDatepickerBasicComponent } from './demos/basic/basic';
import { DemoDatepickerColorThemingComponent } from './demos/color-theming/color-theming';
import { DemoDatepickerChangeLocaleComponent } from './demos/change-locale/change-locale';
import { DemoDatepickerMinMaxComponent } from './demos/min-max/min-max.component';
Expand Down Expand Up @@ -36,22 +36,10 @@ export const demoComponentContent: ContentSection[] = [
{
title: 'Basic',
anchor: 'basic',
component: require('!!raw-loader?lang=typescript!./demos/bs-popup/date-picker-popup.ts'),
html: require('!!raw-loader?lang=markup!./demos/bs-popup/date-picker-popup.html'),
description: `
<p><code>BsDatepickerModule</code> is activily developed but you can use it already</p>
<p>Notable change is additional css for it <code> "/datepicker/bs-datepicker.css"</code> <br></p>
<p>There are two ways of adding css:</p>
<ul>
<li>Load it from CDN. Add <code>&lt;link rel="stylesheet"
href="https://unpkg.com/ngx-bootstrap/datepicker/bs-datepicker.css"&gt;</code> to your
<code>index.html</code></li>
<li>Load it from <code>node_modules/ngx-bootstrap/datepicker/bs-datepicker.css</code> via package bundler
like Angular CLI, if you're using one.
</li>
</ul>
`,
outlet: DemoDatePickerPopupComponent
component: require('!!raw-loader?lang=typescript!./demos/basic/basic.ts'),
html: require('!!raw-loader?lang=markup!./demos/basic/basic.html'),
description: `If you need to see a datepicker just add <code>bsDatepicker</code> property to the input`,
outlet: DemoDatepickerBasicComponent
},
{
title: 'Custom date format',
Expand Down
9 changes: 9 additions & 0 deletions demo/src/app/components/+datepicker/demos/basic/basic.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="row">
<div class="col-xs-12 col-12 col-md-4 form-group">
<input type="text"
placeholder="Please choose a date"
class="form-control"
bsDatepicker>
</div>
</div>

7 changes: 7 additions & 0 deletions demo/src/app/components/+datepicker/demos/basic/basic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Component } from '@angular/core';

@Component({
selector: 'demo-datepicker-basic',
templateUrl: './basic.html'
})
export class DemoDatepickerBasicComponent {}

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions demo/src/app/components/+datepicker/demos/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DatepickerDemoComponent } from './datepicker-demo.component';
import { DemoDatePickerPopupComponent } from './bs-popup/date-picker-popup';
import { DemoDatepickerBasicComponent } from './basic/basic';
import { DemoDatepickerColorThemingComponent } from './color-theming/color-theming';
import { DemoDatepickerChangeLocaleComponent } from './change-locale/change-locale';
import { DemoDatepickerMinMaxComponent } from './min-max/min-max.component';
Expand All @@ -11,7 +11,7 @@ import { DemoDatepickerPlacementComponent } from './placement/placement';

export const DEMO_COMPONENTS = [
DatepickerDemoComponent,
DemoDatePickerPopupComponent,
DemoDatepickerBasicComponent,
DemoDatePickerCustomFormatComponent,
DemoDatepickerColorThemingComponent,
DemoDatepickerChangeLocaleComponent,
Expand Down

0 comments on commit db1a4df

Please sign in to comment.