I am using a date picker and time picker in my application. I want to set the date and time when the page loads. Is this possible? How so?
I solved a similar problem of mine as follows
Calendar cal = Calendar.getInstance();
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH);
int day = cal.get(Calendar.DAY_OF_MONTH);
int hour = cal.get(Calendar.HOUR_OF_DAY);
int min = cal.get(Calendar.MINUTE);
datePicker.updateDate(year, month, day);
timePicker.setCurrentHour(hour);
timePicker.setCurrentMinute(min);