0

i have a GWT bootstrap dateTimeBox and i want to add one day to current time stamp i,e i wanna show default date to tomorrow in client side. tried using calendar instance , but it gives compilation error . Plz help how can i achieve this on client side without making a server call.

Alonso Dominguez
  • 7,750
  • 1
  • 27
  • 37
Ekata
  • 259
  • 2
  • 7
  • 21

1 Answers1

1

To a add a day to current date in GWT you have to use the CalendarUtil class:

Date now = new Date();
CalendarUtil.addDaysToDate(now, 1); // change for the number of days, use negatives to subtract

Hope it helps.

Alonso Dominguez
  • 7,750
  • 1
  • 27
  • 37