function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
David Roberts 4David Roberts 4 

How can we pass date selected from calendar to event override component?

I have a working event overide component but I can't get the date of the selected calendar box.
DishantDishant (Salesforce Developers) 
Hi David,

Could you please elaborate on this so I can assist accordingly. 

Important Update - what you need to do

As a reminder, on December 4, 2023 the Salesforce Discussion Forums will be removed from the Salesforce Developers website. These forums will shut down and all relevant discussions will migrate to the Trailblazer Community digital platform.

During the week starting November 20, you can view discussions, but not post new questions or responses. On December 4, you will no longer be able to access the discussion forums from the Salesforce Developers website.

Please take these steps before November 30, 2023, 11:59 p.m. PT to ensure your contributions follow you to the Trailblazer Community:
  1. If you’re not already a member of the Trailblazer Community, sign up for a Trailblazer account using the same login email address associated with your Developer Discussion Forums account. This is crucial.
  2. If you already have a Trailblazer account, and it’s using a different email address from your Developer Discussion Forums account, we recommend that you log in to the Trailblazer Community and connect your forums email address to your Trailblazer account.
Find more info & support
We know that moving platforms can be a hassle, so we created a special forums users group, the Migration Support Hub, in the Trailblazer Community where you can get training videos, information, and assistance.

We are here to help you through this transition!

Sincerely,
The Forums Support Team
 
David Roberts 4David Roberts 4
Hi, Thanks for reaching out. I have a lightning component 'OverrideNewEvent' on the New Event in 'Buttons, Links and Actions'. When I click on a calendar cell (e.g. 30/11/2023), I am presented with a list of Event types. If I choose 'Training', my overide launches another component, 'TrainingEventDialogue'. case 'Training': newPageReference = { "type": "standard__component", "attributes": { "componentName": "c__TrainingEventDialogue" //"contactRecordTypeId": eventRecordTypeId }, "state": { navigationLocation: "LIST_VIEW", backgroundContext: "/lightning/o/Event/home", count: "1", nooverride: '1', c__recordTypeId: eventRecordTypeId, c__pageReference: pageReference } }//end pageReference break; I would like this component to be aware of the cell I clicked so that I can set the start date to the date from that cell. Currently, I can only set it to today's date. If 'OverrideNewEvent' could be aware of the clicked cell, I could pass it to 'TrainingEventDialogue'. I've included the code below. If this is too complicated, let me know and I'll create a simpler demo version. If you need any more information, let me know. Thanks you, Best regards, Dave Roberts.