Example usage for com.vaadin.ui DateField DateField

List of usage examples for com.vaadin.ui DateField DateField

Introduction

In this page you can find the example usage for com.vaadin.ui DateField DateField.

Prototype

public DateField(ValueChangeListener<LocalDate> valueChangeListener) 

Source Link

Document

Constructs a new DateField with a value change listener.

Usage

From source file:pl.exsio.ca.module.terrain.evidence.AssignmentsDataTable.java

License:Open Source License

private DateField getEndDateField(EntityItem<? extends TerrainAssignment> item) {
    DateField end = new DateField(t("end_date"));
    end.setPropertyDataSource(item.getItemProperty("endDate"));
    end.setResolution(Resolution.DAY);//from  w ww.  ja va 2 s .  com
    end.setDateFormat(CalendarUtil.getDateFormat(this.getLocale()));
    return end;
}

From source file:pl.exsio.ca.module.terrain.evidence.AssignmentsDataTable.java

License:Open Source License

private DateField getStartDateField(EntityItem<? extends TerrainAssignment> item) {
    DateField start = new DateField(t("start_date"));
    start.setPropertyDataSource(item.getItemProperty("startDate"));
    start.setResolution(Resolution.DAY);
    start.addValidator(new NullValidator(t("invalid_start_date"), false));
    start.setDateFormat(CalendarUtil.getDateFormat(this.getLocale()));
    return start;
}

From source file:pl.exsio.ca.module.terrain.evidence.NotificationsDataTable.java

License:Open Source License

private DateField getDateField(EntityItem<? extends TerrainNotification> item) {
    DateField date = new DateField(t("date"));
    date.setPropertyDataSource(item.getItemProperty("date"));
    date.setResolution(Resolution.DAY);//from   w w w .  j  av a  2 s. c o  m
    date.addValidator(new NullValidator(t("invalid_date"), false));
    date.setDateFormat("yyyy-MM-dd");
    return date;
}

From source file:pl.exsio.ca.module.terrain.evidence.QuickNotifyWindow.java

License:Open Source License

private DateField getDateField() {
    final DateField date = new DateField("");
    date.setDateFormat("yyyy-MM-dd");
    date.setResolution(Resolution.DAY);//from  w  w w.  j a  v a  2s .  c o m
    return date;
}

From source file:pl.exsio.ca.module.terrain.evidence.TerrainDataTable.java

License:Open Source License

private DateField getDateField() {
    DateField date = new DateField(t("pick_date"));
    date.setResolution(Resolution.DAY);/*  w  w  w  .java  2  s  .  c om*/
    date.setDateFormat("yyyy-MM-dd");
    return date;
}

From source file:pl.exsio.ca.module.terrain.report.impl.WorkReportImpl.java

License:Open Source License

protected DateField getEndField() {
    DateField end = new DateField(t("end"));
    end.setResolution(Resolution.MINUTE);
    Calendar cal = Calendar.getInstance();
    end.setRequired(true);//from www.  jav  a  2  s .  com
    cal.setTime(new Date());
    end.setSizeFull();
    cal.set(Calendar.HOUR_OF_DAY, 0);
    cal.set(Calendar.MINUTE, 0);
    cal.set(Calendar.DATE, 1);
    cal.add(Calendar.MONTH, 1);
    end.setValue(cal.getTime());
    end.setDateFormat("yyyy-MM-dd");
    return end;
}

From source file:pl.exsio.ca.module.terrain.report.impl.WorkReportImpl.java

License:Open Source License

protected DateField getStartField() {
    DateField start = new DateField(t("start"));
    start.setResolution(Resolution.MINUTE);
    start.setSizeFull();/*from  ww  w.j a  v a2 s.c  om*/
    start.setRequired(true);
    Calendar cal = Calendar.getInstance();
    cal.setTime(new Date());
    cal.set(Calendar.HOUR_OF_DAY, 0);
    cal.set(Calendar.MINUTE, 0);
    cal.set(Calendar.DATE, 1);
    start.setValue(cal.getTime());
    start.setDateFormat("yyyy-MM-dd");
    return start;
}