@include valo-textfield-prompt-style($background-color);
}
- [class$="button"] {
+ [class*="button"] {
@include valo-datefield-button-style($unit-size: $unit-size, $bevel: $bevel, $background-color: $background-color, $border-radius: $border-radius, $border: $border);
}
&.v-disabled {
@include opacity($v-disabled-opacity);
- [class$="button"] {
+ [class*="button"] {
cursor: default;
pointer-events: none;
&:active:after {
@include valo-textfield-readonly-style;
}
- [class$="button"] {
+ [class*="button"] {
cursor: default;
pointer-events: none;
&:active:after {
import java.util.Date;
import java.util.Locale;
+import com.vaadin.data.fieldgroup.FieldGroup;
+import com.vaadin.data.util.ObjectProperty;
+import com.vaadin.data.util.PropertysetItem;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.server.UserError;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.DateField;
+import com.vaadin.ui.FormLayout;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.InlineDateField;
import com.vaadin.ui.Label;
date.setLocale(new Locale("fi", "fi"));
date.setShowISOWeekNumbers(true);
row.addComponent(date);
+
+ PropertysetItem item = new PropertysetItem();
+ item.addItemProperty("date", new ObjectProperty<Date>(getDefaultDate()));
+
+ FormLayout form = new FormLayout();
+
+ FieldGroup binder = new FieldGroup(item);
+ form.addComponent(binder.buildAndBind(
+ "Picker in read-only field group", "date"));
+ binder.setReadOnly(true);
+
+ row.addComponent(form);
}
private void setDate(DateField date) {
+ date.setValue(getDefaultDate());
+ }
+
+ private Date getDefaultDate() {
if (ValoThemeUI.isTestMode()) {
- date.setValue(new Date(2014 - 1900, 5, 7));
+ return new Date(2014 - 1900, 5, 7);
} else {
- date.setValue(new Date());
+ return new Date();
}
}
// TODO Auto-generated method stub
}
-
}
&& getPage().getWebBrowser().getBrowserMajorVersion() == 9) {
menu.setWidth("320px");
}
- // Show .v-app-loading valo-menu-badge
- // try {
- // Thread.sleep(2000);
- // } catch (InterruptedException e) {
- // e.printStackTrace();
- // }
if (!testMode) {
Responsive.makeResponsive(this);
sg.nextString(true) + " " + sg.nextString(false));
child.getItemProperty(ICON_PROPERTY).setValue(
testIcon.get());
- // ((Hierarchical) container).setChildrenAllowed(id, false);
((Hierarchical) container).setParent(id, i);
for (int k = 1; k < 6; k++) {
+ sg.nextString(false));
child.getItemProperty(ICON_PROPERTY).setValue(
testIcon.get());
- // ((Hierarchical) container)
- // .setChildrenAllowed(id, false);
((Hierarchical) container).setParent(id2, id);
for (int l = 1; l < 5; l++) {
+ sg.nextString(false));
child.getItemProperty(ICON_PROPERTY).setValue(
testIcon.get());
- // ((Hierarchical) container)
- // .setChildrenAllowed(id, false);
((Hierarchical) container).setParent(id3, id2);
}
}