How can add new field to an event with dhtmlx scheduler?

点点圈 提交于 2019-12-07 00:19:32

You need to

squivo

This is how you would create a simple href link inside an event:

1) Go to the Event Configuration Console and create a custom field, under the section that says 'CUSTOM FIELD'. Give the field a name. In this example, call it 'url'. Select its type as 'TextArea'.

2) Create another custom field, call it 'link_title'.Also a 'TextArea'. Description is optional.

SAVE

3) Go to the 'Templates' section of the event console. Under the first section (... scheduler.templates.event_text=function(start,end,event){... ) where you can input text, put ->

return "<b> "+event.text+"</b><br><br><a href=\"http://" + event.url + "\">" + event.link_title + "</a>";

SAVE

When you go to create your event from the main calendar, you will see extra fields. Type in them, save your event, and voila. Toot Sweet.

What do you mean by calendar event?

Is it adding a new event?, then it must be done using lightbox(built-in option)

 scheduler.config.lightbox.sections=[
            { name:"description", height:50, map_to:"text", type:"textarea", focus:true },
            { name:"location", height:43, map_to:"event_location", type:"textarea",
                default_value:"Blackheath Avenue London,Greenwich,Greater London SE10 8XJ,UK"},
            {name:"recurring", height:115, type:"recurring", map_to:"rec_type",
                button:"recurring"},
            { name:"time", height:72, type:"time", map_to:"auto"}
        ];

each tag used in here is suppoted by the plugin,,,,in you want to have a seperate customize lightbox go to

http://docs.dhtmlx.com/scheduler/custom_details_form.html

This is the preview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!