Date extraction and DatePicker Initialization


#1

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();


#2

Which listing are you referring to? 12.7?


#3

Yes, 12.7 :slight_smile:


#4

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.


#5

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