code: public LocalDateTime getDateTimePermissive() {
          LocalDate dateValue = datePicker.getDate();
          LocalTime timeValue = timePicker.getTime();
          timeValue = (timeValue == null) ? LocalTime.MIDNIGHT : timeValue;
          if (dateValue == null) {
              return null;
          }
          return LocalDateTime.of(dateValue, timeValue);
      }
docs: getDateTimePermissive, This attempts to retrieve the date from the date picker, and the time
  from the time picker, and return a single LocalDateTime value. If a date is present but the
  time picker contains null, then the time portion of the returned value will be set to
  LocalTime.MIDNIGHT.
  
  This will return null if the date picker contains null (an empty value).
  
  This can return null if "allowEmptyDates" is true for the date picker. If allowEmptyDates is
  false for the date picker, then this can never return null.
  
  Note: If the automatic validation of the date picker text or the time picker text has not yet
  occurred, then the value returned from this function may not always match the current text.
  
  See the DatePicker.getDate() and TimePicker.getTime() functions for additional details.