Remove date from DatePickerCell in gwt

227 views Asked by At

I have implemented a CellTable in gwt, which has a column of type DatePickerCell, which opens a datepicker on click of the cell. I would like to implement something like DateBox, which has a textbox, on click of which a date picker will be opened and date can be removed from textbox, which does not happen in the case of DatePickerCell. I have tried to extend the DatePickerCell to use DateBox instead of DatePicker.

interface Template extends SafeHtmlTemplates {
    @Template("<input type=\"text\" value=\"{0}\" tabindex=\"-1\" style=\"width: 85px;\"></input>")
    SafeHtml div(String value);
}

Please help in this.

Thanks in advance.

1

There are 1 answers

1
H.E On

One simple way is to create your own DateBoxCell by coping the class DatePickerCell and change the DatePicker to DateBox and use your own class in columns.