Only changed default width of datetimepicker for date-only inputs, as this does not work for side-by-side with time picker (references #14)

This commit is contained in:
Bernd Bestel 2018-07-14 08:38:03 +02:00
parent 31ce7a13ea
commit 594e77ca41
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
4 changed files with 7 additions and 5 deletions

View File

@ -158,6 +158,6 @@ td {
}
/* Third party component customizations - Tempus Dominus */
.bootstrap-datetimepicker-widget.dropdown-menu {
.date-only-datetimepicker .bootstrap-datetimepicker-widget.dropdown-menu {
width: auto !important;
}

View File

@ -3,8 +3,8 @@
@endpush
<div class="form-group">
<label for="{{ $id }}">{{ $L($label) }}&nbsp;&nbsp;<span class="small text-muted"><time id="datetimepicker-timeago" class="timeago timeago-contextual"></time>@if(!empty($hint))<br>{{ $L($hint) }}@endif</span></label>
<div class="input-group date datetimepicker" id="{{ $id }}" data-target-input="nearest">
<label for="{{ $id }}">{{ $L($label) }} <span class="small text-muted"><time id="datetimepicker-timeago" class="timeago timeago-contextual"></time>@if(!empty($hint))<br>{{ $L($hint) }}@endif</span></label>
<div class="input-group date datetimepicker @if(!empty($additionalCssClasses)){{ $additionalCssClasses }}@endif" id="{{ $id }}" data-target-input="nearest">
<input type="text" required class="form-control datetimepicker-input"
data-target="#{{ $id }}" data-format="{{ $format }}"
data-init-with-now="{{ BoolToString($initWithNow) }}"

View File

@ -39,7 +39,8 @@
'limitEndToNow' => false,
'limitStartToNow' => true,
'invalidFeedback' => $L('A best before date is required and must be later than today'),
'nextInputSelector' => '#best_before_date'
'nextInputSelector' => '#best_before_date',
'additionalCssClasses' => 'date-only-datetimepicker'
))
<button id="save-inventory-button" type="submit" class="btn btn-success">{{ $L('OK') }}</button>

View File

@ -31,7 +31,8 @@
'limitEndToNow' => false,
'limitStartToNow' => true,
'invalidFeedback' => $L('A best before date is required and must be later than today'),
'nextInputSelector' => '#amount'
'nextInputSelector' => '#amount',
'additionalCssClasses' => 'date-only-datetimepicker'
))
<div class="form-group">