How do I access the fields in my controller?

Yes, it wouldn’t get the date from a table as you didn’t query it. I also missed what dirk picked up that you’re looking for a value from another model in that controller.

So from your Calendar you need to find which meal plan record you want, then you can pass that. As we’re working with minimal information from you its hard to fill in the gaps - but I’ll give it a stab.
From this post I want foreach loop to execute only one time - #3 by makamo66 I know your Mealplans structure - is there even a schedule table? Anyway, here goes:-

$this->loadModel('Mealplans'); //import the desired table/model
$mealplan = $this->Mealplans
  ->find() 
  ->where(['user_id=' => $THEIR_USER_ID, 
/* not sure where you have their id, from auth? like $this->Authentication->getResult()->getData()->id */
    'event_date=' => $THE_DATE_YOU_WANT_HERE])-> //is this syntax for dates ok?
  first();
/* that above code only returns the first meal plan of that date, there could be more than one? */
$this.set('end_date', $mealplan->end_date);
/*NOTE: I AM NOT CHECKING TO SEE IF THE QUERY IS EMPTY! so you'll need to do that */

Those variables in all caps you’ll need to provide - this code won’t work by just copy/paste.

Honestly though, this is kinda going above and beyond :slight_smile: