Entity reference and associated data
You can create a paragraph type (paragraph module replaces field collection in Drupal 8) which contains a reference to your entity type A and a (or more) date and in your entity type B, have a reference to this paragraph.

You can also create a custom field which contains a reference to your entity type A and a date if you want have particular behavior (for example, don't allow users to sort items and sort them automatically by date).