I tried to make the date field with different format on Laravel Voyager 1.1 as shown below:
and yet the upon creation of the record its still using the default format:
When you change the formate, it will only change in view blade (/vendor/tcg/voyager/resources/views/bread/read.blade.php
) not in edit/add
view.
If you want to change it in add/edit
view as well, you need to overwrite the default blade of voyager. You need to overwrite/alter following blade file as per your requirement:
/vendor/tcg/voyager/resources/views/formfields/date.blade.php
Still facing this issue in 2023, this is how I solved:
1- On my rewrite template resources/views/vendor/voyager/formfields/timestamp.blade.php I've changed the class of the input to:
class="form-control custom-datepicker"
$(document).ready(function () { $('.custom-datepicker').datetimepicker({ format: 'DD/MM/YYYY hh:mm' }); })