Topic: Calendar Plugin Add Attribute
FHKaernten priority asked 2 months 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 2 months 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 2 months 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
FHKaernten priority commented 1 month ago
Hi, maybe you didn't see my answer.
Steve Turner priority commented 2 weeks ago
When I run the snippet I do not see the attribute. (test custom attribute)
Grzegorz Bujański staff commented 2 weeks ago
An event with customAttribute
was added to the calendar. Open this event, click save, and check your console. There you will find the event data containing customAttribute
FHKaernten priority commented 5 days ago
Hi, I would need a custom attribute in the view not in Js. In my case I would need a dropdown I draw it in the picture.![Calander Modal][1] [1]: https://usercontent.mdbootstrap.com/mdb-images/support/aa7783aa-8730-4be1-b2bc-dbcf06e1924f-view.jpg
Kamila Pieńkowska staff commented 5 days ago
We do not provide an option to customize the modal yet. At the moment, you would need to modify the source code and create a custom build.
FHKaernten priority commented 4 days ago
Thank you for your answer. Could you please help me with this. I have tried, but I don't seem to be addressing the right place. Could you give me a tip on how to do this?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- 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