kekeh / angular-mydatepicker

Angular datepicker and date range picker :date:
https://kekeh.github.io/angular-mydatepicker/
MIT License
1 stars 11 forks source link

Opens in the wrong position #16

Closed mjarkk closed 4 years ago

mjarkk commented 4 years ago

The input is below the date picker while the arrow is pointing the wrong direction and the date picker seems to be a bit off.

image

My html:

<input
  class="input-box form-control" 
  placeholder="Select a date" 
  angular-mydatepicker
  name="mydate" 
  (click)="dp.toggleCalendar()" 
  [(ngModel)]="selectedDate" 
  [options]="myDpOptions"
  #dp="angular-mydatepicker"
/>

My typescript:

  // ...
  myDpOptions: IAngularMyDpOptions = {
    minYear: 1960,
    maxYear: 2150,
    dateRange: false,
    dateFormat: 'dd-mm-yyyy',
  };
  myDateInit: boolean = true;
  selectedDate: IMyDateModel = null;
  // ...

Notes:

kekeh commented 4 years ago

Did you try to set parent element of input box position: relative style like here: https://github.com/kekeh/angular-mydatepicker/wiki/Own-style-in-input-box-(no-bootstrap)