Skip to content

Commit

Permalink
improve ux datepicker for persian dates
Browse files Browse the repository at this point in the history
  • Loading branch information
A1Gard committed Nov 7, 2024
1 parent d1fb62e commit 9dd5008
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/views/admin/advs/adv-form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class="form-control @error('status') is-invalid @enderror">
</label>
{{-- WIP for lang change def tab--}}
<vue-datetime-picker-input :xmin="{{strtotime('yesterday')}}"
xid="dp" xname="expire" xshow="date" xtitle="Expire date" def-tab="1"
xid="dp" xname="expire" xtitle="Expire date" @if(app()->getLocale() != 'fa') def-tab="1" xshow="date" @else xshow="pdate" @endif
@if(isset($item)) :xvalue="{{strtotime($item->expire)}}" @endif
></vue-datetime-picker-input>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/admin/customers/customer-form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</label>
<vue-datetime-picker-input
:xmax="{{strtotime('yesterday')}}"
xid="dp" xname="dob" xshow="pdate" xtitle="{{__("Date of born")}}" def-tab="0"
xid="dp" xname="dob" xtitle="{{__("Date of born")}}" @if(app()->getLocale() != 'fa') def-tab="1" xshow="date" @else xshow="pdate" @endif
@if(isset($item)) :xvalue="{{strtotime($item->dob)}}" @endif
:timepicker="false"
></vue-datetime-picker-input>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/admin/discounts/discount-form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</label>
<vue-datetime-picker-input
:xmin="{{strtotime('yesterday')}}"
xid="dp" xname="expire" xshow="datetime" xtitle="Expire date" def-tab="1"
xid="dp" xname="expire" xtitle="Expire date" @if(app()->getLocale() != 'fa') def-tab="1" xshow="datetime" @else xshow="pdatetime" @endif
@if(isset($item)) :xvalue="{{strtotime($item->expire)}}" @endif
:timepicker="true"
></vue-datetime-picker-input>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ class="form-control @error('email') is-invalid @enderror"
</label>
<vue-datetime-picker-input
:xmax="{{strtotime('yesterday')}}"
xid="dp" xname="dob" xshow="pdate" xtitle="{{__("Date of born")}}" def-tab="0"
xid="dp" xname="dob" xtitle="{{__("Date of born")}}"
@if(app()->getLocale() != 'fa') def-tab="1" xshow="date" @else xshow="pdate" @endif
:xvalue="{{strtotime(auth('customer')->user()->dob)}}"
:timepicker="false"
></vue-datetime-picker-input>
Expand Down

0 comments on commit 9dd5008

Please sign in to comment.