Package com.extjs.gxt.ui.client.widget.menu

Source Code of com.extjs.gxt.ui.client.widget.menu.DateMenu

/*
* Ext GWT - Ext for GWT
* Copyright(c) 2007-2009, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
package com.extjs.gxt.ui.client.widget.menu;

import java.util.Date;

import com.extjs.gxt.ui.client.widget.DatePicker;

/**
* A Menu for choosing a date.
*/
public class DateMenu extends Menu {

  /**
   * The internal date picker.
   */
  protected DatePicker picker;

  public DateMenu() {
    picker = new DatePicker();
    add(picker);
    addStyleName("x-date-menu");
    setAutoHeight(true);
    plain = true;
    showSeparator = false;
    setEnableScrolling(false);
  }

  /**
   * Returns the selected date.
   *
   * @return the date
   */
  public Date getDate() {
    return picker.getValue();
  }

  /**
   * Returns the date picker.
   *
   * @return the date picker
   */
  public DatePicker getDatePicker() {
    return picker;
  }
}
TOP

Related Classes of com.extjs.gxt.ui.client.widget.menu.DateMenu

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.