Move validation error message for date picker component
This commit is contained in:
parent
83dc3b55e6
commit
c8ffb4e150
@ -121,6 +121,11 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
.date-picker-component {
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
@ -140,5 +145,10 @@
|
|||||||
.usa-form-group-date-ok {
|
.usa-form-group-date-ok {
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.usa-input-error-message {
|
||||||
|
padding-top: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,13 +11,8 @@
|
|||||||
inline-template>
|
inline-template>
|
||||||
|
|
||||||
<div class="usa-input date-picker" v-bind:class="{ 'usa-input--success': isDateValid }">
|
<div class="usa-input date-picker" v-bind:class="{ 'usa-input--success': isDateValid }">
|
||||||
<p v-if="!isWithinDateRange" class="usa-input-error-message">
|
|
||||||
{% if maxdate and mindate %}Date must be between {{maxdate.strftime("%Y-%m-%d")}} and {{mindate.strftime("%Y-%m-%d")}}{% endif %}
|
|
||||||
{% if maxdate and not mindate %}Date must be before or on {{maxdate.strftime("%Y-%m-%d")}}{% endif %}
|
|
||||||
{% if mindate and not maxdate %}Date must be after or on {{mindate.strftime("%Y-%m-%d")}}{% endif %}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div>
|
<div class="date-picker-component">
|
||||||
<input v-bind:value="formattedDate" type="hidden" />
|
<input v-bind:value="formattedDate" type="hidden" />
|
||||||
|
|
||||||
<div class="usa-form-group usa-form-group-month">
|
<div class="usa-form-group usa-form-group-month">
|
||||||
@ -62,6 +57,12 @@
|
|||||||
{{ Icon("ok", classes="icon--green") }}
|
{{ Icon("ok", classes="icon--green") }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p v-if="!isWithinDateRange" class="usa-input-error-message">
|
||||||
|
{% if maxdate and mindate %}Date must be between {{maxdate.strftime("%Y-%m-%d")}} and {{mindate.strftime("%Y-%m-%d")}}{% endif %}
|
||||||
|
{% if maxdate and not mindate %}Date must be before or on {{maxdate.strftime("%Y-%m-%d")}}{% endif %}
|
||||||
|
{% if mindate and not maxdate %}Date must be after or on {{mindate.strftime("%Y-%m-%d")}}{% endif %}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</date-selector>
|
</date-selector>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user