2

I am using ng-pick-datetime with datetime range with some input field and an datetime picker (calender) icon:

<div class="dl-date-time-picker">
    Date Time:    
          <input           
                [style.width]="'200px'"
                [(ngModel)]="dateTimeRange"
                (ngModelChange)="getrange($event)"
                [selectMode]="'range'"
                [owlDateTimeTrigger]="dt" 
                [owlDateTime]="dt">

          <span class="trigger" [owlDateTimeTrigger]="dt">
            <i class="fas fa-calendar-alt"></i>
          </span>    
          <owl-date-time #dt></owl-date-time>        
</div>

enter image description here It looks normally, and the calender item opens correctly aligned under the icon...

But now, I would like to make the input field invisible for the user, and just offer the calender picker icon...

I used <input type="hidden" and this works so far, the problem that I now have is, that the calender item opens on the far left side of my browser window... I don't know how to fix that problem:

enter image description here

How can I fix that problem, its too far left side...

1
  • As per show in image , I think you have to set it with help of css. Commented Aug 17, 2018 at 11:16

1 Answer 1

1

Apparently the datetime picker needs the input field to determine the right position on the screen. You can hide the input via CSS, then it should work:

.dl-date-time-picker > input {
    visibility: hidden;
    width: 0;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.