-
Sencha User
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 .
-
Sencha User
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
-
Forum Rules