orchidsoftware / platform

Orchid is a @laravel package that allows for rapid application development of back-office applications, admin/user panels, and dashboards.
https://orchid.software
MIT License
4.26k stars 631 forks source link

DateRange on the phone cannot select a time range #2735

Open TuanAnh0907 opened 8 months ago

TuanAnh0907 commented 8 months ago

Describe the bug I can't select the time period when using DateRange on my phone but on my PC it works fine https://orchid.software/en/docs/field/#daterange

TuanAnh0907 commented 8 months ago

image

On mobile, you can only choose one

Toshkq93 commented 6 months ago

@TuanAnh0907

you need to create a custom class in php, set attributes field disableMobile, than create custom controller on JS and view. Will change for you controller name in view all data. ` class DateRangeCustom extends Field implements ComplexFieldConcern { /**

and than in your view in div add data attribute `<div class="row" data-controller="datetimeCustom" data-datetimeCustom-disable-mobile="{{$disableMobile}}" data-datetimeCustom-allow-input="true" data-datetimeCustom-range="#end_{{ \Illuminate\Support\Str::slug($attributes['name']) }}"

"`