diff --git a/resources/assets/js/components/AkauntingDate.vue b/resources/assets/js/components/AkauntingDate.vue index 95e0e3168..9b125e1b9 100644 --- a/resources/assets/js/components/AkauntingDate.vue +++ b/resources/assets/js/components/AkauntingDate.vue @@ -4,12 +4,14 @@ :class="[ {'readonly': readonly}, {'disabled': disabled}, + {'hidden-year': hiddenYear}, formClasses ]" :footer-error="formError" :prependIcon="icon" :readonly="readonly" :disabled="disabled" + @focus="focus" > { + wrapper.classList.add('hidden-year-flatpickr'); + }); + } else { + date_wrapper_html.forEach((wrapper) => { + wrapper.classList.remove('hidden-year-flatpickr'); + }); + } } }, @@ -135,3 +153,9 @@ export default { } } + + \ No newline at end of file diff --git a/resources/views/partials/form/date_group.blade.php b/resources/views/partials/form/date_group.blade.php index 0b93b26ea..18d62ed25 100644 --- a/resources/views/partials/form/date_group.blade.php +++ b/resources/views/partials/form/date_group.blade.php @@ -8,7 +8,6 @@ @else :form-classes="[{'has-error': form.errors.get('{{ $name }}') }]" @endif - :group_class="'{{ $group_class }}'" icon="fa fa-{{ $icon }}" @@ -52,6 +51,10 @@ @interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event" @endif + @if (!empty($attributes['hidden_year'])) + hidden-year + @endif + @if (!empty($attributes['change'])) @change="{{ $attributes['change'] }}" @endif diff --git a/resources/views/settings/localisation/edit.blade.php b/resources/views/settings/localisation/edit.blade.php index 2018e8346..d2ae80aaa 100644 --- a/resources/views/settings/localisation/edit.blade.php +++ b/resources/views/settings/localisation/edit.blade.php @@ -18,7 +18,7 @@
- {{ Form::dateGroup('financial_start', trans('settings.localisation.financial_start'), 'calendar', ['id' => 'financial_start', 'class' => 'form-control datepicker', 'show-date-format' => 'j F', 'date-format' => 'd-m', 'autocomplete' => 'off'], setting('localisation.financial_start')) }} + {{ Form::dateGroup('financial_start', trans('settings.localisation.financial_start'), 'calendar', ['id' => 'financial_start', 'class' => 'form-control datepicker', 'show-date-format' => 'j F', 'date-format' => 'd-m', 'autocomplete' => 'off', 'hidden_year' => true], setting('localisation.financial_start')) }} {{ Form::selectGroup('financial_denote', trans('settings.localisation.financial_denote.title'), 'calendar', $financial_denote_options, setting('localisation.financial_denote'), []) }}