如何通过点击DatePicker的操作表中的完成按钮来访问日期:
-(IBAction)doneBtnClick:(id)sender{
......
else if([sender tag]==203)
{
NSDateComponents *components = [[NSCalendar currentCalendar] components:NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear fromDate:pickerDate.date];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"dd MMM yyyy"];
//[self.lblDateSelected setAttributedText:strDate];
//[pickerDate setDate:[NSDate date]];
model.items.purchaseDate = [pickerDate setDate:[NSDate date]]; //error here!
purchaseDate的类型为NSDate。