open-admin
open-admin copied to clipboard
Form DateRange Field does not work when using in NestedForm
Describe the bug The field "RangeDate" doesn't work when placed inside a nested form, like a "hasMany" nested form.
$form->hasMany('availabilities', __('Rango de fechas'), function (Form\NestedForm $form) { $form->dateRange('start', 'end', __("Fecha inicial")); })
It's because all rangeDate fields share the same ID, in this case "start" and "end" and that crashes the javascript.
All fields placed inside a nested form should have a different ID, for example appending the row index.
Hi there
I can confirm this
Also on update
(Works on create) but loses things go awry on update form