code: public LocalDateTime getDateTimeStrict() {
          LocalDate dateValue = datePicker.getDate();
          LocalTime timeValue = timePicker.getTime();
          if (dateValue == null || timeValue == null) {
              return null;
          }
          return LocalDateTime.of(dateValue, timeValue);
      }
docs: getDateTimeStrict, 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 this will return null.
  
  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.