Examples of DateWrapper


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

   * Sets the minimum date. Hours, minutes, seconds, and milliseconds are cleared.
   *
   * @param minDate the minimum date
   */
  public void setMinDate(Date minDate) {
    this.minDate = new DateWrapper(minDate).clearTime().asDate();
  }
View Full Code Here

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

   * Sets the max date. Hours, minutes, seconds, and milliseconds are cleared.
   *
   * @param maxDate the max date
   */
  public void setMaxDate(Date maxDate) {
    this.maxDate = new DateWrapper(maxDate).clearTime().asDate();
  }
View Full Code Here

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

    monthPickerOkButton = new TextButton(getMessages().okText());
    monthPickerOkButton.addSelectHandler(new SelectHandler() {
      @Override
      public void onSelect(SelectEvent event) {
        DateWrapper d = new DateWrapper(mpSelYear, mpSelMonth, 1);
        update(d);
        hideMonthPicker();
      }
    });

    monthPickerCancelButton = new TextButton(getMessages().cancelText());
    monthPickerCancelButton.addSelectHandler(new SelectHandler() {
      @Override
      public void onSelect(SelectEvent event) {
        hideMonthPicker();
      }
    });

    monthPicker = XElement.createElement("div");
    monthPicker.getStyle().setDisplay(Display.NONE);

    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

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

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

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

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

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

  @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

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

    }
  }

  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

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

    setValue(activeDate.asDate());
  }

  protected void onKeyHome(NativeEvent evt) {
    if (evt.<XEvent> cast().getCtrlOrMetaKey()) {
      setValue(new DateWrapper(activeDate.getFullYear(), 0, 1).asDate());
    } else {
      setValue(activeDate.getFirstDayOfMonth().asDate(), false);
    }
  }
View Full Code Here

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

  private void handleDateClick(XElement target, String dt) {
    String[] tokens = dt.split(",");
    int year = Integer.parseInt(tokens[0]);
    int month = Integer.parseInt(tokens[1]);
    int day = Integer.parseInt(tokens[2]);
    Date d = new DateWrapper(year, month, day).asDate();
    if (d != null && !appearance.isDisabled(target.getParentElement())) {
      setValue(d);
    }
  }
View Full Code Here

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

      setValue(d);
    }
  }

  private void selectToday() {
    setValue(new DateWrapper().asDate());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.