1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Set startDate in date pickers

This commit is contained in:
Hillel Coren 2018-04-10 22:53:39 +03:00
parent 30518d48c5
commit d95d8ae5f0
4 changed files with 10 additions and 6 deletions

View File

@ -205,7 +205,8 @@
->label('next_reset') ->label('next_reset')
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT)) ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))
->addGroupClass('reset_counter_date_group') ->addGroupClass('reset_counter_date_group')
->append('<i class="glyphicon glyphicon-calendar"></i>') !!} ->append('<i class="glyphicon glyphicon-calendar"></i>')
->data_date_start_date($account->formatDate($account->getDateTime())) !!}
</div> </div>
</div> </div>

View File

@ -114,12 +114,14 @@
->data_bind("datePicker: start_date, valueUpdate: 'afterkeydown'") ->data_bind("datePicker: start_date, valueUpdate: 'afterkeydown'")
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT)) ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))
->appendIcon('calendar') ->appendIcon('calendar')
->addGroupClass('start_date') !!} ->addGroupClass('start_date')
->data_date_start_date($account->formatDate($account->getDateTime())) !!}
{!! Former::text('end_date') {!! Former::text('end_date')
->data_bind("datePicker: end_date, valueUpdate: 'afterkeydown'") ->data_bind("datePicker: end_date, valueUpdate: 'afterkeydown'")
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT)) ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))
->appendIcon('calendar') ->appendIcon('calendar')
->addGroupClass('end_date') !!} ->addGroupClass('end_date')
->data_date_start_date($account->formatDate($account->getDateTime())) !!}
@else @else
@if ((! $expense || ! $expense->transaction_id)) @if ((! $expense || ! $expense->transaction_id))

View File

@ -216,9 +216,9 @@
<div data-bind="visible: is_recurring" style="display: none"> <div data-bind="visible: is_recurring" style="display: none">
{!! Former::select('frequency_id')->label('frequency')->options($frequencies)->data_bind("value: frequency_id") {!! Former::select('frequency_id')->label('frequency')->options($frequencies)->data_bind("value: frequency_id")
->appendIcon('question-sign')->addGroupClass('frequency_id')->onchange('onFrequencyChange()') !!} ->appendIcon('question-sign')->addGroupClass('frequency_id')->onchange('onFrequencyChange()') !!}
{!! Former::text('start_date')->data_bind("datePicker: start_date, valueUpdate: 'afterkeydown'") {!! Former::text('start_date')->data_bind("datePicker: start_date, valueUpdate: 'afterkeydown'")->data_date_start_date($account->formatDate($account->getDateTime()))
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))->appendIcon('calendar')->addGroupClass('start_date') !!} ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))->appendIcon('calendar')->addGroupClass('start_date') !!}
{!! Former::text('end_date')->data_bind("datePicker: end_date, valueUpdate: 'afterkeydown'") {!! Former::text('end_date')->data_bind("datePicker: end_date, valueUpdate: 'afterkeydown'")->data_date_start_date($account->formatDate($account->getDateTime()))
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))->appendIcon('calendar')->addGroupClass('end_date') !!} ->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))->appendIcon('calendar')->addGroupClass('end_date') !!}
{!! Former::select('recurring_due_date')->label(trans('texts.due_date'))->options($recurringDueDates)->data_bind("value: recurring_due_date")->appendIcon('question-sign')->addGroupClass('recurring_due_date') !!} {!! Former::select('recurring_due_date')->label(trans('texts.due_date'))->options($recurringDueDates)->data_bind("value: recurring_due_date")->appendIcon('question-sign')->addGroupClass('recurring_due_date') !!}
</div> </div>

View File

@ -370,7 +370,8 @@
->label('start_date') ->label('start_date')
->appendIcon('calendar') ->appendIcon('calendar')
->placeholder('') ->placeholder('')
->addGroupClass('send-date') !!} ->addGroupClass('send-date')
->data_date_start_date($account->formatDate($account->getDateTime())) !!}
</div> </div>
</div> </div>