Package com.google.gwt.widgetideas.datepicker.client

Examples of com.google.gwt.widgetideas.datepicker.client.DateTimePicker


      }
    });
    table.setWidget(3, 2, enableTimePicker);

    // Creating a date time picker with AM/PM 12h TimePicker
    final DateTimePicker dateTimePicker = new DateTimePicker(false);
    dateTimePicker.setWidth("200px");
    // Create a label to display the selected date
    final Label dateLabel = new Label();
    Button getDate = new Button("Show date");
    getDate.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        // Display the selected date/time using DateTimeFormat
        dateLabel.setText(DateTimeFormat.getMediumDateTimeFormat().format(
            dateTimePicker.getDate()));
      }
    });
    dateLabel.setStyleName("sandbox-Date");
    table.setHTML(4, 0, "Date time picker:");
    table.setWidget(4, 1, dateTimePicker);
    table.setWidget(5, 0, getDate);
    table.setWidget(5, 1, dateLabel);
    final CheckBox enableDateTimePicker = new CheckBox("Enable/disable");
    enableDateTimePicker.setChecked(dateTimePicker.isEnabled());
    enableDateTimePicker.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        dateTimePicker.setEnabled(enableDateTimePicker.isChecked());
      }
    });
    table.setWidget(4, 2, enableDateTimePicker);

    final VolumeSlider volumeSlider = new VolumeSlider(0, -100, 100);
View Full Code Here

TOP

Related Classes of com.google.gwt.widgetideas.datepicker.client.DateTimePicker

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.