Date extraction and DatePicker Initialization


The example listing does not allow the DatePicker to send the date back, since the year/month/day of the outer class is fixed at runtime when the DatePicker is initialized.

Instead, the parameters arg1/arg2/arg3 should be used:

mDate = new GregorianCalendar(arg1, arg2, arg3).getTime();


Which listing are you referring to? 12.7?


Yes, 12.7 :slight_smile:


The listing in the book does what you describe. The parameters Eclipse automatically named arg1, arg2, and arg3 in your code are named year, month, day in the book.


Oh! You’re right, my bad :smiley: