Package com.sencha.gxt.core.client.util

Examples of com.sencha.gxt.core.client.util.DateWrapper


    if (maxDateValidator == null) {
      maxDateValidator = new MaxDateValidator(maxValue);
      addValidator(maxDateValidator);
    }
    if (maxValue != null) {
      maxValue = new DateWrapper(maxValue).resetTime().asDate();
      maxDateValidator.setMaxDate(maxValue);
    }
  }
View Full Code Here


    if (minDateValidator == null) {
      minDateValidator = new MinDateValidator(minValue);
      addValidator(minDateValidator);
    }
    if (minValue != null) {
      minValue = new DateWrapper(minValue).resetTime().asDate();
      minDateValidator.setMinDate(minValue);
    }
  }
View Full Code Here

  }

  private void fillStore() {
    if (!initialized) {
      this.initialized = true;
      DateWrapper min = minValue != null ? new DateWrapper(resetDate(minValue))
          : new DateWrapper(1970, 0, 1).clearTime();
      DateWrapper max = maxValue != null ? new DateWrapper(resetDate(maxValue))
          : new DateWrapper(1970, 0, 1).clearTime().addDays(1);

      store.clear();

      while (min.before(max)) {
        store.add(min.asDate());
View Full Code Here

    }
  }

  @SuppressWarnings("deprecation")
  private Date resetDate(Date date) {
    return new DateWrapper(1970, 0, 1).clearTime().addHours(date.getHours()).addMinutes(date.getMinutes()).addSeconds(
        date.getSeconds()).asDate();
  }
View Full Code Here

    getElement().appendChild(monthPicker);

    cells = Util.toElementArray(appearance.getDateCells(getElement()));

    activeDate = value != null ? value : new DateWrapper();
    update(activeDate);

    new KeyNav(this) {
      @Override
      public void onKeyPress(NativeEvent evt) {
View Full Code Here

   *
   * @param maxDate the max date
   */
  public void setMaxDate(Date maxDate) {
    if (maxDate != null) {
      maxDate = new DateWrapper(maxDate).resetTime().asDate();
    }
    this.maxDate = maxDate;
    update(activeDate);
  }
View Full Code Here

   *
   * @param minDate the minimum date
   */
  public void setMinDate(Date minDate) {
    if (minDate != null) {
      minDate = new DateWrapper(minDate).resetTime().asDate();
    }
    this.minDate = minDate;
    update(activeDate);
  }
View Full Code Here

  @Override
  public void setValue(Date date, boolean fireEvents) {
    if (date == null) {
      this.value = null;
      update(new DateWrapper().resetTime());
    } else {
      this.value = new DateWrapper(date).resetTime();
      update(value);
    }

    if (overElement != null) {
      appearance.onUpdateDateStyle(overElement, DateState.OVER, false);
View Full Code Here

        appearance.onMonthSelected(mpYears.getElement(i), false);
      }
      appearance.onMonthSelected(pn, true);
      mpSelYear = pn.getPropertyInt("xyear");
    } else if (target.is(appearance.monthPickerOkSelector())) {
      DateWrapper d = new DateWrapper(mpSelYear, mpSelMonth, 1);
      update(d);
      hideMonthPicker();
    } else if (target.is(appearance.monthPickerCancelSelector())) {
      hideMonthPicker();
    } else if (target.is(appearance.leftYearSelector())) {
View Full Code Here

    }
  }

  protected void onKeyEnd(NativeEvent evt) {
    if (evt.getShiftKey()) {
      setValue(new DateWrapper(activeDate.getFullYear(), 11, 31).asDate());
    } else {
      setValue(activeDate.getLastDateOfMonth().asDate(), false);
    }
  }
View Full Code Here

TOP

Related Classes of com.sencha.gxt.core.client.util.DateWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.