private void setNextRepetitionDate(LocalDate nextRepetitionDate) {
    String formattedNextRepetitionDate =
        nextRepetitionDate.format(DateTimeFormatter.ofPattern("dd.MM.yyyy"));

    nextRepetitionDateTextField.setText(formattedNextRepetitionDate);
    setNextRepetitionDateForeground(nextRepetitionDate);
  }
 private void setNextRepetitionDateForeground(LocalDate nextRepetitionDate) {
   if (nextRepetitionDate.isAfter(LocalDate.now()))
     nextRepetitionDateTextField.setForeground(NEXT_REPETITION_DATE_DEFAULT_FOREGROUND);
   else nextRepetitionDateTextField.setForeground(NEXT_REPETITION_DATE_BEFORE_TODAY_FOREGROUND);
 }