President Joe Biden and former President Donald Trump have agreed to two unprecedented early debates.