Reputation: 263
I'm having a button and angular js material date picker in a row. Date picker is not aligned correctly. I tried adding a margin too. Without using an additional CSS file ,(adding in line css) please help me to align these components.
<div>
<md-button class="md-raised md-button job-export-jobs md-ink-ripple">Export Jobs Date</md-button>
<md-input-container>
<label for="jobDate">Export date</label>
<md-datepicker
ng-model="model.exportJobsDate">
</md-datepicker>
</md-input-container>
Upvotes: 0
Views: 432
Reputation: 222552
You can use layout="row"
and then flex
by giving the distribution,
<div class='calendarDiv' layout="row">
<div flex=40>
<md-icon style="position:absolute;margin-top:15px; left:20px" md-svg-src="calendar.svg"></md-icon>
<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>
</div>
<div flex=60>
<md-button class="md-raised md-button job-export-jobs md-ink-ripple">Export Jobs Date</md-button>
</div>
</div>
Upvotes: 1