6

I have something like this:

Screenshot of 2 inputs (A "Date of recruitment" date picker input and a "months" input)

How is it possible to make the line under the "Date of recruitment" and the "down array" adapt to half of the layout as in flex="50" for example. It is pretty easy for normal input fields.

Current markup:

<md-content layout-padding> 
 <form> 
  <div layout-gt-xs="row"> 
   <md-input-container class="md-block" flex-gt-xs> 
      <label> date </label> 
      <md-datepicker ng-model="cv.contract.dateOfRecruitment"></md-datepicker> 
   </md-input-container>
   <md-input-container class="md-block" flex-gt-xs> 
      <label> months </label> 
          <input required ng-model="cv.contract.months" ng-pattern="/^[1-9][0-9]*$/" /> 
   </md-input-container> 
  </div>
 </form> 
</md-content>
Edric
  • 24,639
  • 13
  • 81
  • 91

4 Answers4

1

See these tickets:

This feature won't be implemented due to layout troubles. But there's a workaround solution described here

Mikhail Kopylov
  • 2,008
  • 5
  • 27
  • 58
1

There is no official documentation. You could consider using custom CSS.

Try to add width: 100% to the container of the date picker. It will increase width certainly. Of course, it assumes that the parent container of date picker is divided by half-width(50%) each other.

Rise
  • 1,493
  • 9
  • 17
0

Adding this property as !important worked for me

mat-form-field {
  width: 100px !important;
}
Pipo
  • 4,653
  • 38
  • 47
0

You can set the size of the datepicker:

<input class="md-datepicker-input md-input" id="input_58" size="50">
Sterling Diaz
  • 3,789
  • 2
  • 31
  • 35