Is there another have_rows() loop before you try to get the sub fields ‘time_expiry’ and ‘calendar_item’? or are these sub field of ‘calendar’? Is ‘calendar’ from ‘option’ as well or from a post?
Also, to get the value of a field you need to use ‘get_sub_field()and not
the_sub_field()` since the second function echo the value and does not return anything.