#1 March 25, 2022 3:26pm

doon.mok
Member
Registered: May 6, 2015
Posts: 141

Using the Events - Date Chooser field outside the Events module

I am trying to use the 'Events - Date Choose' field outside of the events module but it does not work like in the Events module.
For example, I added it to a different module and when I select the Reoccur list, nothing happens.

Some things I tried
I added the same fields in the database and looked at the modules.json code and used the same code.
I tried to create my own field and copy the code of draw, options and settings files. It was the same issue as using the original.
I added BTXEvents the the Class Name in the module.

Is there a way to use the Events - Date Choose field in a different module?

Thanks

Offline

#2 March 28, 2022 1:47pm

doon.mok
Member
Registered: May 6, 2015
Posts: 141

Re: Using the Events - Date Chooser field outside the Events module

For anyone that wants to use the field outside of the module. You will need to create your own field and copy draw.php, process.php and events.js. Move events.js to custom/admin/js folder.

Might be a better way but this worked for me.

Offline

#3 March 29, 2022 4:03pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Using the Events - Date Chooser field outside the Events module

I think this is likely due to the field relying on extension context to function properly. Glad you figured out a hack that worked for you! smile

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.