-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Name attribute in datepicker component #88
Comments
Thank you. I'm working on v8. I'll make sure to add this to the next release. |
@oliver-yopiter I'm working on this topic but unable to find a Flatpickr config option to set the name and id attribute of the generated input. |
@tanthammar I'm not sure if it's the right file but in my testings i found that in the file |
Yes that will apply the name attr to the hidden input but not the flatpickr input. |
Yes, for our purposes this it totally fine |
OK. I've added that to v8. |
Hello,
we noticed that when we create a datepicker component like this:
Group::make('')->fields([$this->datePickerField('date_of_birth', __('models/persons.fields.date_of_birth'))->colspan(3)])
the created HTML output has noname
attribute in the input tag like your other components.Because we are using some third party scripts to access form inputs by their
name
attribute it would be awesome if you could change the template of the datepicker component so that it is also using the name we provide as first parameter when creating the component (in our case 'date_of_birth').Additinal context
This is how our
FormFields.php
looks like:public function datePickerField($name, $name_local) { return DatePicker::make($name_local, $name) ->rules(isset($this->modelClass::$rules[$name]) ? $this->modelClass::$rules[$name] : ''); }
I hope my description is clear to you. If not don't hesitate to ask further questions
The text was updated successfully, but these errors were encountered: