Examples of Datepicker


Examples of org.wicketstuff.jwicket.ui.datepicker.DatePicker

   
   
   
   
    final TextField<Date> datePickerInput = new TextField<Date>("datePickerInput", new Model<Date>());
    DatePicker datePicker = new DatePicker(calendar20x22) {
      private static final long serialVersionUID = 1L;
      @Override
      protected void onSelect(final AjaxRequestTarget target, final String pickedDate, final SpecialKeys specialKeys) {
        target.appendJavascript(
            "alert('Selected Date: " + pickedDate + ", Pressed keys: " +
View Full Code Here

Examples of org.xwiki.test.ui.po.editor.DatePicker

    })
    public void testDatePicker()
    {
        // First select a date using the picker and assert the value of the date input.
        DateClassFieldEditPane dateField = new DateClassFieldEditPane(editor.addField("Date").getName());
        DatePicker datePicker = dateField.openDatePicker();
        datePicker.setYear("2011");
        datePicker.setMonth("October");
        datePicker.setDay("13");
        datePicker.setHour("8 AM");
        datePicker.setMinute("15");
        String selectedDate = dateField.getDefaultValue();
        // Ignore the number of seconds.
        Assert.assertTrue(selectedDate.startsWith("13/10/2011 08:15:"));

        // Set the value of the date input and assert the date selected by the picker.
        dateField.setDefaultValue("17/03/2020 19:43:34");

        // Currently the date picker doesn't know how to parse a date with a specified format. The workaround is to pass
        // the date time stamp when generating the date input, but for this the page needs to be saved and reloaded.
        editor.clickSaveAndView().edit();
        datePicker = new DateClassFieldEditPane("date1").openDatePicker();

        Assert.assertEquals("2020", datePicker.getYear());
        Assert.assertEquals("March", datePicker.getMonth());
        Assert.assertEquals("17", datePicker.getDay());
        Assert.assertEquals("7 PM", datePicker.getHour());
        Assert.assertEquals("40", datePicker.getMinute());
    }
View Full Code Here

Examples of sos.scheduler.editor.app.DatePicker

            }
          });
          optSpecificDay.setText(SPECIFIC_DAY);
        }

        txtSpeDay = new DatePicker(jobGroup, SWT.NONE);
        final GridData gridData_16 = new GridData(GridData.FILL, GridData.CENTER, true, false);
        gridData_16.widthHint = 131;
        txtSpeDay.setLayoutData(gridData_16);
        txtSpeDay.setEnabled(false);
View Full Code Here

Examples of sos.scheduler.editor.app.DatePicker

      Label validFromLabel = new Label(scheduleGroup, SWT.NONE);
      validFromLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      validFromLabel.setText("Valid From");


      validFrom = new DatePicker(scheduleGroup, SWT.BORDER);
      validFrom.setEditable(true);



      validFrom.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setValidDateFrom();         
        }



      });
      final GridData gridData = new GridData();
      gridData.grabExcessHorizontalSpace = true;
      gridData.horizontalAlignment = SWT.FILL;
      validFrom.setLayoutData(gridData);

      final Composite composite_1_1 = new Composite(scheduleGroup, SWT.NONE);
      composite_1_1.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
      final GridLayout gridLayout_1 = new GridLayout();
      gridLayout_1.numColumns = 6;
      composite_1_1.setLayout(gridLayout_1);

      txtHourFrom = new Text(composite_1_1, SWT.CENTER | SWT.BORDER);
      txtHourFrom.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          txtHourFrom.selectAll();
        }
      });
      txtHourFrom.setTextLimit(2);
      txtHourFrom.addVerifyListener(new VerifyListener() {
        public void verifyText(final VerifyEvent e) {
          e.doit = Utils.isOnlyDigits(e.text);
        }
      });
      txtHourFrom.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setValidDateFrom();
        }
      });
      txtHourFrom.setEnabled(false);
      final GridData gridData_1_1_1 = new GridData(GridData.FILL, GridData.FILL, false, false);
      gridData_1_1_1.minimumWidth = 30;
      gridData_1_1_1.widthHint = 30;
      txtHourFrom.setLayoutData(gridData_1_1_1);

      final Label label_2_1 = new Label(composite_1_1, SWT.NONE);
      label_2_1.setText(":");

      txtMinuteFrom = new Text(composite_1_1, SWT.CENTER | SWT.BORDER);
      txtMinuteFrom.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          txtMinuteFrom.selectAll();
        }
      });
      txtMinuteFrom.setTextLimit(2);
      txtMinuteFrom.addVerifyListener(new VerifyListener() {
        public void verifyText(final VerifyEvent e) {
          e.doit = Utils.isOnlyDigits(e.text);
        }
      });
      txtMinuteFrom.setEnabled(false);
      txtMinuteFrom.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setValidDateFrom();
        }
      });
      final GridData gridData_2_1_1 = new GridData(GridData.FILL, GridData.CENTER, false, false);
      gridData_2_1_1.minimumWidth = 30;
      gridData_2_1_1.widthHint = 30;
      txtMinuteFrom.setLayoutData(gridData_2_1_1);

      final Label label_1_1_1 = new Label(composite_1_1, SWT.NONE);
      label_1_1_1.setText(":");

      txtSecondFrom = new Text(composite_1_1, SWT.CENTER | SWT.BORDER);
      txtSecondFrom.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          txtSecondFrom.selectAll();
        }
      });
      txtSecondFrom.setTextLimit(2);
      txtSecondFrom.addVerifyListener(new VerifyListener() {
        public void verifyText(final VerifyEvent e) {
          e.doit = Utils.isOnlyDigits(e.text);
        }
      });
      txtSecondFrom.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setValidDateFrom();
        }
      });
      txtSecondFrom.setEnabled(false);
      txtSecondFrom.setLayoutData(new GridData(30, SWT.DEFAULT));

      final Label hhmmssLabel_1_1 = new Label(composite_1_1, SWT.NONE);
      hhmmssLabel_1_1.setText("hh:mm:ss");

      final Label validToLabel = new Label(scheduleGroup, SWT.NONE);
      validToLabel.setText("Valid To");

      validTo = new DatePicker(scheduleGroup, SWT.BORDER);
      validTo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
      validTo.setEditable(true);
      validTo.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          setValidDateTo();         
View Full Code Here

Examples of sos.scheduler.editor.app.DatePicker

    private void createCreated() {
        GridData gridData6 = new GridData();
        gridData6.horizontalAlignment = GridData.FILL; // Generated
        gridData6.grabExcessHorizontalSpace = false; // Generated
        gridData6.verticalAlignment = GridData.CENTER; // Generated
        created = new DatePicker(group, SWT.NONE);
        created.setEditable(true);
        created.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
            public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
              listener.setCreated(created.getISODate());
              
View Full Code Here

Examples of sos.scheduler.editor.app.DatePicker

    /**
     * This method initializes modified
     */
    private void createModified() {
        GridData gridData13 = new GridData(GridData.FILL, GridData.CENTER, false, false);
        modified = new DatePicker(group, SWT.NONE);
        modified.setEditable(true);
        modified.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
            public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
                listener.setModified(modified.getISODate());
            }
View Full Code Here

Examples of sos.scheduler.editor.app.DatePicker

          specificDayTabItem.setText(SPECIFIC_DAY);
          {
            final Group group = new Group(tabFolder, SWT.NONE);
            group.setLayout(new GridLayout());
            specificDayTabItem.setControl(group);
            txtSpeDay = new DatePicker(group, SWT.NONE);
            txtSpeDay.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, true, false));
            txtSpeDay.addModifyListener(new ModifyListener() {
              public void modifyText(final ModifyEvent e) {
                discardChanges();
                String date = txtSpeDay.getISODate();
View Full Code Here

Examples of uk.gov.nationalarchives.droid.gui.filter.DatePicker

            for (CriterionOperator metaDataItem : metadata.getOperationList()) {
                secondComboBox.addElement(metaDataItem);
            }
            secondComboBox.setSelectedItem(filterCriteria.getOperator());
            if (metadata instanceof LastModifiedDateMetadata) {
                component = new DatePicker();
                ((DatePicker) component).setDateCombos(filterCriteria.getValueFreeText());
            } else {
                if (metadata instanceof ExtensionMismatchMetadata) {
                    component = configureComboBox(filterCriteria, metadata);
                } else {
View Full Code Here

Examples of wicket.extensions.markup.html.datepicker.DatePicker

  {
    this.add(new TextField("nom"));

    final TextField datePicker = new TextField("date", Date.class);
    this.add(datePicker);
    this.add(new DatePicker("datePicker", datePicker));

    this.add(new DropDownChoice("discipline", new PropertyModel(course,
        "discipline"), this.disciplineController.getDisciplines(),
        new DisciplineChoiceRenderer()));
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.