0

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.

KB Prodigy
  • 231
  • 5
  • 13
  • "a date picker will be opened and date can be removed from textbox" What do you mean by this – dhamibirendra Dec 27 '13 at 15:20
  • If data is celltable is populated with values...like start date and end date...if i want to remove the end date from the column...and save it in the database...how will the removing part from the gwt cell table column be?? – KB Prodigy Dec 29 '13 at 18:14

1 Answers1

0

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.

Christian Strempfer
  • 7,291
  • 6
  • 50
  • 75
H.E
  • 1
  • Hello H.E..I want this feature, as the user should be able to remove the date and save it back to database, not just changing the date. I will try your workaround though I have tried changing the DatePicker to DateBox, but that doesn't help either. – KB Prodigy Dec 30 '13 at 09:23