Closed (outdated)
Project:
Webform
Version:
6.3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2024 at 09:12 UTC
Updated:
13 Dec 2024 at 14:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dahousecat commentedComment #3
dahousecat commentedComment #4
dahousecat commentedExample data-disabled-dates attribute:
data-disabled-dates="2024-12-17,2024-12-18,2024-12-19,2024-12-25,2024-12-26"Comment #5
jrockowitz commentedI would not want to support individual options; instead, I'd like to make it easier for people (aka developers) to define custom options to a webform element.
Attached is a POC (untested) approach that adds support to
data-options="{}"thedata-optionswould always be applied last. This could become a universal solution that allows developers to define element-specific custom JS options.The approach you could take would be something like...
data-options="{'beforeShowDay': my_custom_before_show_data'}"New features will only be added to 6.3.x
Comment #6
dahousecat commentedI think that approach sounds very wise.
The patch I have will solve my use case for now, but once this feature gets added I can delete my patch :)
Comment #7
dahousecat commentedComment #8
jrockowitz commentedLet's leave this open because I think #5 needs to happen for most webform element libraries.
Comment #9
cilefen commentedComment #10
liam morlandComment #11
jrockowitz commented@see #3493832: Allow custom data-options to be added to elements JavaScript options