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 void setValue(Object value) {

    LocalDateTime localDateTime;

    if (value instanceof Date) {

      Date date = (Date) value;
      localDateTime = LocalDateTime.fromDateFields(date);
    } else if (value instanceof LocalDateTime) {
      localDateTime = (LocalDateTime) value;
    } else {
      return;
    }

    // hour
    SingleSelectionSpinner<HourToSelect> hourSelector =
        (SingleSelectionSpinner<HourToSelect>) findViewById(R.id.timePicker1);

    for (int i = 0; i < this.hourToSelectList.size(); i++) {
      HourToSelect hourToSelect = this.hourToSelectList.get(i);
      if (hourToSelect.getHour() == localDateTime.getHourOfDay()) {
        hourSelector.setSelection(i);
        break;
      }
    }

    // day
    localDateTime = localDateTime.withMillisOfDay(0);
    SingleSelectionSpinner<DayToSelect> daySelector =
        (SingleSelectionSpinner<DayToSelect>) findViewById(R.id.datePicker1);

    for (int i = 0; i < this.dayToSelectList.size(); i++) {
      DayToSelect dayToSelect = this.dayToSelectList.get(i);
      if (dayToSelect.getDate().equals(localDateTime)) {
        daySelector.setSelection(i);
        break;
      }
    }
  }