Skip to content

Commit

Permalink
fix datepicker/datetimepicker placement (#951)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikerodonnell89 committed Jun 18, 2019
1 parent d31ceb6 commit c512876
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Expand Up @@ -52,7 +52,7 @@ export class CustomI18nLabels extends CalendarI18nLabels {

@Component({
selector: 'fd-datepicker-i18n-example',
template: `<fd-date-picker [(ngModel)]="selectedDay" [placement]="'top-end'"></fd-date-picker>`,
template: `<fd-date-picker [(ngModel)]="selectedDay"></fd-date-picker>`,

// Note that this can be provided in the root of your application.
providers: [
Expand Down
@@ -1,5 +1,5 @@
<!-- Just needs a date object in the ts file! -->
<fd-datetime-picker [(ngModel)]="this.date" [placement]="'bottom-end'"></fd-datetime-picker>
<fd-datetime-picker [(ngModel)]="this.date"></fd-datetime-picker>

<span style="padding-left: 20px;">
Selected: {{date ? date.toLocaleString() : 'null'}}
Expand Down
2 changes: 1 addition & 1 deletion library/src/lib/date-picker/date-picker.component.ts
Expand Up @@ -109,7 +109,7 @@ export class DatePickerComponent implements OnInit, OnDestroy, ControlValueAcces
/** The placement of the popover. It can be one of: top, top-start, top-end, bottom,
* bottom-start, bottom-end, right, right-start, right-end, left, left-start, left-end. */
@Input()
placement: Placement = 'auto';
placement: Placement = 'bottom-start';

/**
* Function used to disable certain dates in the calendar.
Expand Down
Expand Up @@ -57,7 +57,7 @@ export class DatetimePickerComponent implements OnInit, OnDestroy, ControlValueA
/** The placement of the popover. It can be one of: top, top-start, top-end, bottom,
* bottom-start, bottom-end, right, right-start, right-end, left, left-start, left-end. */
@Input()
placement: Placement = 'auto';
placement: Placement = 'bottom-start';

/** Whether the time component should be meridian (am/pm). */
@Input()
Expand Down

0 comments on commit c512876

Please sign in to comment.