Keyword

K2 Tools - Calendar Module - add item?

  • Nebula Designs
  • Nebula Designs's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 months ago #159392 by Nebula Designs
K2 Tools - Calendar Module - add item? was created by Nebula Designs
Hi everyone,

I really hope you can help. I've managed to use the K2 Tool Calendar to display upcoming items on the correct date, by changing the 'creation date'.

However, is it at all possible to make it so that logged in users can click a space on the calendar which does NOT have a booking/event on it, and then proceed to add one?

I imagine this would be by linking all empty calendar dates to a K2 item form, for registered users with category permissions? But how would I alter the calendar for this?

Your help would be much appreciated, as I'd like to use K2 as a method for booking up services and this seems the best way to have that tie in to a functioning (and automatically updated) availability calendar. And could this calendar click create the item FOR that date?, so it then shows up as booked?

Kindest,

Chris

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 9 months ago #159405 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Tools - Calendar Module - add item?
Hello Chris,

This can be done relatively easy with a custom jQuery snippet, and map the text in a custom link.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Nebula Designs
  • Nebula Designs's Avatar Topic Author
  • Offline
  • New Member
More
7 years 9 months ago #159671 by Nebula Designs
Replied by Nebula Designs on topic K2 Tools - Calendar Module - add item?
Great to see that it's possible...but would you mind clarifying a little more for me, please? I'm just now running through some jquery and javascript courses, but I'm not there just yet.

I figure I would need to target the calendar divs or td with an id in order to add the function of the jquery to open up the relevant item form (I guess that would be a menu item alias?). How would I ensure the creation date is the one that was clicked on in the calendar to open the form? I know I could just make sure the customer enters the correct creation date, but I would like it to be as auto-filled as possible....if it's possible.

I'm also thinking of this same sort of thing for customer testimonial submission...it seems sensible to use K2 for everything possible, rather than use other components.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 9 months ago - 7 years 9 months ago #159695 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Tools - Calendar Module - add item?
This is the function you are looking for -> api.jquery.com/wrap/
As for the link, you can get the link of the menu item.

Hint: using the on() function instead of the click() function can bind events on elements which are not yet present in the DOM.

Finally as, for the correct date, I would approach it using a simple K2 plugin which reads $_GET parameters and depending on the params auto fill the date input.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Last edit: 7 years 9 months ago by Krikor Boghossian.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum