use of org.gwtbootstrap3.extras.datetimepicker.client.ui.DateTimePicker in project kie-wb-common by kiegroup.
the class DatePickerFieldRenderer method getDateWidget.
private Widget getDateWidget(String inputId) {
if (field.getShowTime()) {
DateTimePicker box = new DateTimePicker();
box.setId(inputId);
box.setPlaceholder(field.getPlaceHolder());
box.setEnabled(!field.getReadOnly());
box.setAutoClose(true);
box.setHighlightToday(true);
box.setShowTodayButton(true);
handler = readOnly -> box.setEnabled(!readOnly);
return box;
}
DatePicker box = new DatePicker();
box.setId(inputId);
box.setPlaceholder(field.getPlaceHolder());
box.setEnabled(!field.getReadOnly());
box.setAutoClose(true);
box.setHighlightToday(true);
box.setShowTodayButton(true);
box.setContainer(RootPanel.get());
handler = readOnly -> box.setEnabled(!readOnly);
return box;
}
use of org.gwtbootstrap3.extras.datetimepicker.client.ui.DateTimePicker in project kie-wb-common by kiegroup.
the class DateTimePickerPresenterViewImpl method initDatePicker.
public void initDatePicker() {
DOMUtil.removeAllChildren(container);
dateTimePicker = new DateTimePicker();
dateTimePicker.setGWTFormat(DateEditableColumnGenerator.DEFAULT_DATE_AND_TIME_FORMAT_MASK);
dateTimePicker.setHighlightToday(true);
dateTimePicker.setShowTodayButton(true);
dateTimePicker.setAutoClose(true);
dateTimePicker.addChangeDateHandler(event -> {
presenter.notifyDateChange(dateTimePicker.getValue());
});
dateTimePicker.addHideHandler(hideEvent -> {
hideEvent.stopPropagation();
presenter.notifyHide();
});
dateTimePicker.getElement().setClassName(DATE_PICKER_CELL_STYLE);
DOMUtil.appendWidgetToElement(container, dateTimePicker);
}
Aggregations