Skip to content

Commit

Permalink
docs(datepicker): add information about datepicker icon (#3402)
Browse files Browse the repository at this point in the history
Fixes #3306
  • Loading branch information
reduckted authored and maxokorokov committed Oct 17, 2019
1 parent 39fea1f commit 6d6bbd9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@

<hr/>
<pre>Model: {{ model | json }}</pre>

<ngb-alert class="mt-3 mb-0" type="info" [dismissible]="false">
You must provide the icon for the button. This allows you
to choose an icon that matches your application's style.
In this example, the icon is set via a CSS class.
</ngb-alert>
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ <h4>Handling the popup</h4>
a date is selected via keyboard or mouse.
It can stay open after date selection if you set <code>[autoClose]</code> input to <code>false</code>
</p>

<p>
When using a button (or any other element) to open the popup, the styling and content of the button
is left up to you. In the example above, the button is simply given the text "Toggle", but you
could also use an icon, or even group the <code>input</code> and <code>button</code> with an
<a href="https://getbootstrap.com/docs/{{ bootstrapVersion }}/components/input-group/#button-addons">input group</a>.
</p>
</ngbd-overview-section>


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';

import { environment } from '../../../../environments/environment';

import {Snippet} from '../../../shared/code/snippet';
import { NgbdDemoList } from '../../shared';
import { NgbdOverview } from '../../shared/overview';
Expand Down Expand Up @@ -178,6 +180,8 @@ export class NgbdDatepickerOverviewComponent {
}),
};

bootstrapVersion = environment.bootstrap;

sections: NgbdOverview = {};

constructor(demoList: NgbdDemoList) {
Expand Down

0 comments on commit 6d6bbd9

Please sign in to comment.