Topic: Calendar Plugin Add Attribute

FHKaernten priority asked 2 weeks ago


Hi, I have installed the Claendar plugin and added all the events etc. Now I would need to add a dropdown in my event. I have tried to include it via my js, this is not working. then i tried to change it on the teamplate.js under the mdb plugin calendar and it is not working either. so my question now is there any possibility at all that i can add attributes in the event mask to customize the event creation of the user according to my wishes?


FHKaernten priority answered 1 week ago


Hi, thank you very much for your answer.

Thank you, I have already been able to save the additional attributes in the background that I needed to assign the appointments to my users.

Now it's really about the display in the pop-up and adding a dropdown in my case.

My calender.js is under src/plugins/calendar/js/calendar.js and i tried to modify src/plugins/calendar/js/utils/templates.js but i cant see any changes in the frontend.

You are right the next step would be to modify calender.js as well.


Grzegorz Bujański staff answered 1 week ago


When you tried to add your code to the template.js file, did you import the Callendar plugin via plugins/js/calendar.min.js or src/plugins/calendar/js/calendar.js? If you want to modify src you need to import Callendar from src.

You will also need to make changes to the calendar.js file to save the value selected from the dropdown in the new event.

However, if you just want to add a custom attribute to the event, you can use the newEventAttributes option. You can also add a custom attribute to the event before passing it to the calendar. Check out this snippet: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/6281880#js-tab-view I've added an example here of how to do it



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 8.0.0
  • Device: PC
  • Browser: Firefox
  • OS: Windows
  • Provided sample code: No
  • Provided link: No