Skip to content

Commit

Permalink
feat(datepicker): add support for placement "auto"
Browse files Browse the repository at this point in the history
Closes #1257
Closes #1820
  • Loading branch information
mschoudry authored and pkozlowski-opensource committed Sep 6, 2017
1 parent a053819 commit d8bee8e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/datepicker/datepicker-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {NgbDatepicker, NgbDatepickerNavigateEvent} from './datepicker';
import {DayTemplateContext} from './datepicker-day-template-context';
import {NgbDateParserFormatter} from './ngb-date-parser-formatter';

import {positionElements} from '../util/positioning';
import {positionElements, PlacementArray} from '../util/positioning';
import {NgbDateStruct} from './ngb-date-struct';
import {NgbCalendar} from './ngb-calendar';
import {NgbDatepickerService} from './datepicker-service';
Expand Down Expand Up @@ -103,12 +103,13 @@ export class NgbInputDatepicker implements OnChanges,
*/
@Input() outsideDays: 'visible' | 'collapsed' | 'hidden';


/**
* Placement of a datepicker popup. Accepts: "top", "bottom", "left", "right", "bottom-left",
* "bottom-right" etc.
*/
@Input() placement = 'bottom-left';
* Placement of a datepicker popup accepts:
* "top", "top-left", "top-right", "bottom", "bottom-left", "bottom-right",
* "left", "left-top", "left-bottom", "right", "right-top", "right-bottom"
* and array of above values.
*/
@Input() placement: PlacementArray = 'bottom-left';

/**
* Whether to display days of the week
Expand Down

0 comments on commit d8bee8e

Please sign in to comment.