# Create an event by clicking on the calendar

**URL:** <https://forum.bubble.io/t/create-an-event-by-clicking-on-the-calendar/320838>\
**Category:** Need help\
**Created:** [May 4, 2024, 5:15pm UTC](https://forum.bubble.io/t/create-an-event-by-clicking-on-the-calendar/320838 "2024-05-04T17:15:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samaywise](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@samaywise](https://forum.bubble.io/u/samaywise)\
**Post date:** [May 4, 2024, 5:15pm UTC](https://forum.bubble.io/t/create-an-event-by-clicking-on-the-calendar/320838/1 "2024-05-04T17:15:54Z")

</div>

Hello,

I am trying to build an “obvious” fonctionnality with the full calendar plugin, that is showing a popup to create an event when clincked on a day/time inside the calendar. The popup should be automatically filled with data such as the date and starting time selected by clicking on the calendar.

I tried using the "When Calendar X’s day is clicked :

Step 1 : Show popup  
Step 2 display data in Popup =\> But here I don’t know how to retrieve and display the date and start time that I clicked.

I searched everywhere how to do this but I could not find the info…

---

<div class="post-metadata">

**Author:** ![joqr231210](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/joqr231210/32/214358_2.png) [@joqr231210](https://forum.bubble.io/u/joqr231210)\
**Post date:** [May 4, 2024, 5:17pm UTC](https://forum.bubble.io/t/create-an-event-by-clicking-on-the-calendar/320838/2 "2024-05-04T17:17:14Z")

</div>

Put the calendar on the page

Then search for the “When a calendar day is clicked” workflow in the workflow tab, and execute what you want.

---

<div class="post-metadata">

**Author:** ![Newed](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/newed/32/262530_2.png) [@Newed](https://forum.bubble.io/u/Newed)\
**Post date:** [May 5, 2024, 1:17am UTC](https://forum.bubble.io/t/create-an-event-by-clicking-on-the-calendar/320838/3 "2024-05-05T01:17:28Z")

</div>

Well, there are a few ways you can do this and they will depend on what you really want. Especially if it is a functionality that will be used in the future to edit the event, for example, where the popup data source will interfere.

**# Approach 1**

1 - Create a Custom State (date type) on the popup

2 - Use the action “When Calendar day is clicked” to:  
2.1 - Show/Animate popup  
2.2 - Set the current date clicked as the value to the Custom State (using set state action)

3 - Use some input to get the Custom State value as default input value (the use of input would be to allow the users to change the date if they want)

4 - Create the event using the input value and other info needed

* * *

**# Approach 2**

1 - Set the popup’s type of content as date

2 - Use the action “When Calendar day is clicked” to:  
2.1 - Show/Animate popup  
2.2 - Set the current date clicked as the data source of the popup (using display data action)

3 - Use some input to get the Parent’s Group date as default input value (using input for the same reason mentioned in the approach 1)

4 - Create the event using the input value and other info needed

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [July 13, 2024, 5:16pm UTC](https://forum.bubble.io/t/create-an-event-by-clicking-on-the-calendar/320838/4 "2024-07-13T17:16:38Z")

</div>

Closed on July 13, 2024, 5:16pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
