Results 1 to 2 of 2

Thread: How to subtract 180 days from current day

  1. #1

    Default How to subtract 180 days from current day

    I used java.util.calender utility,

    Date date = new Date();
    toDate.setValue(date);
    Calendar cal = Calendar.getInstance();
    cal.setTime(date);
    cal.add(Calendar.DATE, -180);
    date = cal.getTime();
    fromDate.setValue(date);


    but it is showing "No source code is available for type java.util.Calendar; did you forget to inherit a required module?"

    This is because GXT not able to convert Java code into JavaScript.

    so Please provide some way to set date 180 days from the current date .

  2. #2

    Default

    currentDate date = new Date();
    fromDate date = newDate();
    fromDate.setDate(currentDate.getDate() -180);


    give that a try

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •