private void initialization() {

    Date value = getValue();

    dayToSelectList.clear();
    hourToSelectList.clear();

    SingleSelectionSpinner<DayToSelect> daySelector =
        (SingleSelectionSpinner<DayToSelect>) findViewById(R.id.datePicker1);
    SingleSelectionSpinner<HourToSelect> hourSelector =
        (SingleSelectionSpinner<HourToSelect>) findViewById(R.id.timePicker1);

    // build date
    LocalDateTime now = startDate;
    now = now.withMillisOfDay(0);
    now = now.withHourOfDay(0);

    for (int i = 0; i < maxDay; i++) {
      dayToSelectList.add(new DayToSelect(now, now.getDayOfMonth() + "/" + now.getMonthOfYear()));
      now = now.plusDays(1);
    }

    daySelector.setItems(dayToSelectList);

    // build date
    for (int i = 0; i <= 24; i++) {
      hourToSelectList.add(new HourToSelect(i, i + ":00"));
    }

    hourSelector.setItems(hourToSelectList);

    if (value != null) {
      setValue(value);
    }
  }
  @Override
  public Object getValue(Class<?> type) {

    SingleSelectionSpinner<DayToSelect> daySelector =
        (SingleSelectionSpinner<DayToSelect>) findViewById(R.id.datePicker1);
    SingleSelectionSpinner<HourToSelect> hourSelector =
        (SingleSelectionSpinner<HourToSelect>) findViewById(R.id.timePicker1);

    if (daySelector.getSelectedItem() != null && hourSelector.getSelectedItem() != null) {
      LocalDateTime date = daySelector.getSelectedItem().getDate();

      date = date.withHourOfDay(hourSelector.getSelectedItem().getHour());

      return date.toDate();
    }
    return null;
  }