Sort pages throughout different date types

In a blog page I created, the user can create posts labeled either as “news” or “event”. The “event”-posts have an additional field for an event date.

post.yml

fields:
  category:
    type: select
    required: true
    default: news
    options:
      news: News
      event: Event
  eventdate:
    label: Event date
    type: date
    display: DD-MM-YYYY
    when: 
      category: event
    required: true
  text:
    type: textarea

In the template, the posts are sorted by publication date:

blog.php

<ul> 
  <?php foreach ($page->children()->listed()->sortBy('date', 'desc') as $post) : ?>
     ...
  <?php endforeach ?>
</ul>

Now here comes my problem: If a new event gets added spontaneously, it always appears at the top of the sorting, even if the event date is earlier than that of a previously created event (because the sorting is done by publication date).

If I set the sorting to

<ul> 
  <?php foreach ($page->children()->listed()->sortBy('eventdate', 'desc', 'date', 'desc') as $post) : ?>
     ...
  <?php endforeach ?>
</ul>

all the events are rendered first (because there is no event date on the “news” categorized posts).

So how can I fix that?
I would like to use the event date for the event posts and the publication date for the news posts and then sort all posts by their date.

Any help?

What is the publication date?

I’m sorry I forgot to mention that there is a date field for the news posts:

post.yml

fields:
  ...
  date:
    label: Publishing date
    type: date
    display: DD-MM-YYYY
    default: today
    when: 
      category: news

Then you can create either a page model method (date or eventdate) for one of the page types or use sortBy with a callback depending on template, see Sorting collections | Kirby CMS

A page model method returning the right date for each category helped. Thank you!