Improve styles of date of birth field

This commit is contained in:
Björn Fromme
2018-10-24 12:47:14 +02:00
parent 1a93ab029e
commit 28ef19cc4d
2 changed files with 10 additions and 2 deletions
@@ -39,10 +39,10 @@
<input id="firstName" type="text" v-model="address.firstName" class="form-control"> <input id="firstName" type="text" v-model="address.firstName" class="form-control">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="dateOfBirth" class="control-label"> <label class="control-label">
Geburtsdatum: Geburtsdatum:
</label> </label>
<input id="dateOfBirth" type="text" ref="picker" class="form-control datepicker--visible"> <span ref="picker"></span>
</div> </div>
</div> </div>
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
@@ -127,6 +127,7 @@
this.picker = $(this.$refs.picker).flatpickr({ this.picker = $(this.$refs.picker).flatpickr({
dateFormat: 'd.m.Y', dateFormat: 'd.m.Y',
locale: German, locale: German,
inline: true,
onChange: (selectedDates) => { onChange: (selectedDates) => {
this.address.dateOfBirth = flatpickr.formatDate(selectedDates[0], 'Y-m-d') this.address.dateOfBirth = flatpickr.formatDate(selectedDates[0], 'Y-m-d')
} }
@@ -42,8 +42,12 @@
&.inline { &.inline {
border: 1px solid $color-grey-light; border: 1px solid $color-grey-light;
}
&.centered {
margin: 0 auto 16px; margin: 0 auto 16px;
} }
} }
.flatpickr-day { .flatpickr-day {
@@ -57,6 +61,9 @@
} }
.flatpickr-day.selected { .flatpickr-day.selected {
background: $color-brand-secondary;
border-color: $color-brand-secondary;
&.startRange, &.endRange { &.startRange, &.endRange {
background: $color-brand-secondary; background: $color-brand-secondary;
border-color: $color-brand-secondary; border-color: $color-brand-secondary;