Story highlights Trump on Wednesday declined to say that he would accept the results of the election

Obama also used the opportunity while in Florida to weigh in on the close Senate race

Miami (CNN) President Barack Obama admonished Donald Trump Thursday, saying the Republican nominee's claims that he might not accept the results of next month's election are "not a joking matter."

"I want everybody to pay attention here. This is dangerous," Obama said at a Hillary for America event in Miami Gardens, Florida.

"Because when you try to sow the seeds of doubt in people's mind about the legitimacy of our elections, that undermines our democracy. Then you are doing the work of our adversaries for them."

Obama also encouraged the crowd of about 1,800 at Florida Memorial University to take advantage of Florida's early voting, telling the audience in doing so they can reject what the President called Trump's "dark, pessimistic fear-mongering."

"Our democracy depends on people knowing that their vote matters. That those who occupy the seats of power were chosen by the people," Obama said.

Read More