Examples of DatetimeField


Examples of org.apache.wicket.extensions.yui.calendar.DateTimeField

    setOutputMarkupId(true);
   
    add(new RequiredTextField<String>("appointmentName"));
    add(new TextArea<String>("appointmentDescription"));
    add(new TextField<String>("appointmentLocation"));
    add(new DateTimeField("appointmentStarttime"));
    add(new DateTimeField("appointmentEndtime"));
    final PasswordTextField pwd = new PasswordTextField("password");
    pwd.setEnabled(isPwdProtected());
    pwd.setOutputMarkupId(true);
    add(pwd);
   
View Full Code Here

Examples of org.apache.wicket.extensions.yui.calendar.DateTimeField

      RequiredTextField integerTextField = new RequiredTextField("integerProperty",
          Integer.class);
      add(integerTextField.add(NumberValidator.POSITIVE));
      add(new RequiredTextField("doubleProperty", Double.class));

      add(new DateTimeField("dateProperty"));
      // add(DateTextField.forShortStyle("dateProperty").add(new
      // DatePicker()));

      add(new RequiredTextField("integerInRangeProperty", Integer.class).add(NumberValidator
          .range(0, 100)));
View Full Code Here

Examples of org.apache.wicket.extensions.yui.calendar.DateTimeField

        target.add(bookedRoom, roomParamsBlock);
      }
    }));
    roomParamsBlock.add(roomParams);
    roomParams.add(new RoomTypeDropDown("room.roomtype"));
    roomParams.add(new DateTimeField("start", modelStart));
    roomParams.add(new DateTimeField("end", modelEnd));
    add(form.setOutputMarkupId(true));
  }
View Full Code Here

Examples of org.apache.wicket.extensions.yui.calendar.DateTimeField

      add(new RequiredTextField<String>("title").setLabel(Model.of(WebSession.getString(572))));
      DefaultWysiwygToolbar toolbar = new DefaultWysiwygToolbar("toolbarContainer");
      add(toolbar);
      add(new WysiwygEditor("description", toolbar));
      add(new TextField<String>("location"));
      add(start = new DateTimeField("start"));
      add(end = new DateTimeField("end"));
      pwd.setEnabled(getModelObject().isPasswordProtected());
      pwd.setOutputMarkupId(true);
      add(pwd);
     
      List<AppointmentReminderTyps> remindTypes = getRemindTypes();
View Full Code Here

Examples of org.elasticsearch.common.joda.time.DateTimeField

                // set with rounding
                DateFieldParser fieldParser = dateFieldParsers.get(sInterval.substring(0, index));
                if (fieldParser == null) {
                    throw new FacetPhaseExecutionException(facetName, "failed to parse interval [" + sInterval + "] with custom rounding using built in intervals (year/month/...)");
                }
                DateTimeField field = fieldParser.parse(dateTime.getChronology());
                int rounding = this.rounding.get(sInterval.substring(index + 1));
                if (rounding == -1) {
                    throw new FacetPhaseExecutionException(facetName, "failed to parse interval [" + sInterval + "], rounding type [" + (sInterval.substring(index + 1)) + "] not found");
                }
                dateTime.setRounding(field, rounding);
            } else {
                DateFieldParser fieldParser = dateFieldParsers.get(sInterval);
                if (fieldParser != null) {
                    DateTimeField field = fieldParser.parse(dateTime.getChronology());
                    dateTime.setRounding(field, MutableDateTime.ROUND_FLOOR);
                } else {
                    // time interval
                    try {
                        interval = TimeValue.parseTimeValue(sInterval, null).millis();
View Full Code Here

Examples of org.goda.time.DateTimeField

        public void printTo(
                StringBuffer buf, long instant, Chronology chrono,
                int displayOffset, DateTimeZone displayZone, Locale locale) {
            try {
                DateTimeField field = iFieldType.getField(chrono);
                FormatUtils.appendUnpaddedInteger(buf, field.get(instant));
            } catch (RuntimeException e) {
                buf.append('\ufffd');
            }
        }
View Full Code Here

Examples of org.joda.time.DateTimeField

        }
        System.out.println("\nTestIslamicChronology.testCalendar");
        DateTime epoch = new DateTime(1, 1, 1, 0, 0, 0, 0, ISLAMIC_UTC);
        long millis = epoch.getMillis();
        long end = new DateTime(3000, 1, 1, 0, 0, 0, 0, ISO_UTC).getMillis();
        DateTimeField dayOfWeek = ISLAMIC_UTC.dayOfWeek();
        DateTimeField dayOfYear = ISLAMIC_UTC.dayOfYear();
        DateTimeField dayOfMonth = ISLAMIC_UTC.dayOfMonth();
        DateTimeField monthOfYear = ISLAMIC_UTC.monthOfYear();
        DateTimeField year = ISLAMIC_UTC.year();
        DateTimeField yearOfEra = ISLAMIC_UTC.yearOfEra();
        DateTimeField era = ISLAMIC_UTC.era();
        int expectedDOW = new DateTime(622, 7, 16, 0, 0, 0, 0, JULIAN_UTC).getDayOfWeek();
        int expectedDOY = 1;
        int expectedDay = 1;
        int expectedMonth = 1;
        int expectedYear = 1;
        while (millis < end) {
            int dowValue = dayOfWeek.get(millis);
            int doyValue = dayOfYear.get(millis);
            int dayValue = dayOfMonth.get(millis);
            int monthValue = monthOfYear.get(millis);
            int yearValue = year.get(millis);
            int yearOfEraValue = yearOfEra.get(millis);
            int dayOfYearLen = dayOfYear.getMaximumValue(millis);
            int monthLen = dayOfMonth.getMaximumValue(millis);
            if (monthValue < 1 || monthValue > 12) {
                fail("Bad month: " + millis);
            }
           
            // test era
            assertEquals(1, era.get(millis));
            assertEquals("AH", era.getAsText(millis));
            assertEquals("AH", era.getAsShortText(millis));
           
            // test date
            assertEquals(expectedDOY, doyValue);
            assertEquals(expectedMonth, monthValue);
            assertEquals(expectedDay, dayValue);
View Full Code Here

Examples of org.joda.time.DateTimeField

        }
        System.out.println("\nTestEthiopicChronology.testCalendar");
        DateTime epoch = new DateTime(1, 1, 1, 0, 0, 0, 0, ETHIOPIC_UTC);
        long millis = epoch.getMillis();
        long end = new DateTime(3000, 1, 1, 0, 0, 0, 0, ISO_UTC).getMillis();
        DateTimeField dayOfWeek = ETHIOPIC_UTC.dayOfWeek();
        DateTimeField dayOfYear = ETHIOPIC_UTC.dayOfYear();
        DateTimeField dayOfMonth = ETHIOPIC_UTC.dayOfMonth();
        DateTimeField monthOfYear = ETHIOPIC_UTC.monthOfYear();
        DateTimeField year = ETHIOPIC_UTC.year();
        DateTimeField yearOfEra = ETHIOPIC_UTC.yearOfEra();
        DateTimeField era = ETHIOPIC_UTC.era();
        int expectedDOW = new DateTime(8, 8, 29, 0, 0, 0, 0, JULIAN_UTC).getDayOfWeek();
        int expectedDOY = 1;
        int expectedDay = 1;
        int expectedMonth = 1;
        int expectedYear = 1;
        while (millis < end) {
            int dowValue = dayOfWeek.get(millis);
            int doyValue = dayOfYear.get(millis);
            int dayValue = dayOfMonth.get(millis);
            int monthValue = monthOfYear.get(millis);
            int yearValue = year.get(millis);
            int yearOfEraValue = yearOfEra.get(millis);
            int monthLen = dayOfMonth.getMaximumValue(millis);
            if (monthValue < 1 || monthValue > 13) {
                fail("Bad month: " + millis);
            }
           
            // test era
            assertEquals(1, era.get(millis));
            assertEquals("EE", era.getAsText(millis));
            assertEquals("EE", era.getAsShortText(millis));
           
            // test date
            assertEquals(expectedYear, yearValue);
            assertEquals(expectedYear, yearOfEraValue);
            assertEquals(expectedMonth, monthValue);
View Full Code Here

Examples of org.joda.time.DateTimeField

        /**
         * The fields returned by getInstance should be the same when the
         * duration is the same for both method calls.
         */
        DateTimeField fieldOne = UnsupportedDateTimeField.getInstance(
                dateTimeFieldTypeOne, UnsupportedDurationField
                        .getInstance(weeks));
        DateTimeField fieldTwo = UnsupportedDateTimeField.getInstance(
                dateTimeFieldTypeOne, UnsupportedDurationField
                        .getInstance(weeks));
        assertSame(fieldOne, fieldTwo);

        /**
         * The fields returned by getInstance should NOT be the same when the
         * duration is the same for both method calls.
         */
        DateTimeField fieldThree = UnsupportedDateTimeField.getInstance(
                dateTimeFieldTypeOne, UnsupportedDurationField
                        .getInstance(months));
        assertNotSame(fieldOne, fieldThree);
    }
View Full Code Here

Examples of org.joda.time.DateTimeField

     * The getName() method should return the same value as the getName() method
     * of the DateTimeFieldType that was used to create the instance.
     *
     */
    public void testPublicGetNameMethod() {
        DateTimeField fieldOne = UnsupportedDateTimeField.getInstance(
                dateTimeFieldTypeOne, UnsupportedDurationField
                        .getInstance(weeks));

        assertSame(fieldOne.getName(), dateTimeFieldTypeOne.getName());
    }
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.