Documentation

(jvx:client:gui)

Change date format of Cell Editor

To set a custom date format on a date cell, simply use following code:

UIDateCellEditor dateEditor = new UIDateCellEditor();
//use long pre-configured date format
dateEditor.setDateFormat(((SimpleDateFormat)SimpleDateFormat.getDateInstance(SimpleDateFormat.LONG)).toPattern());

or use a custom format

dateEditor.setDateFormat("yyyy-MM-dd");

Above statements will create a date cell editor with configured date format. To apply the format, simply set the cell editor

databook.getRowDefinition().getColumnDefinition("COLUMN_NAME").getDataType().setCellEditor(dateEditor);

It's not necessary to create multiple date cell editors for the same format, simply re-use existing instances.

We have some static cell editors in our ApplicationUtil class, e.g.

IMAGE_VIEWER

We recommend that you create a utility class for your cell editors as well.

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information