DatePickerViewController.m 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // DatePickerViewController.m
  3. // RedAnt ERP Mobile
  4. //
  5. // Created by Ray on 14-7-23.
  6. // Copyright (c) 2014年 United Software Applications, Inc. All rights reserved.
  7. //
  8. #import "DatePickerViewController.h"
  9. @interface DatePickerViewController ()
  10. @end
  11. @implementation DatePickerViewController
  12. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  13. {
  14. self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  15. if (self) {
  16. // Custom initialization
  17. }
  18. return self;
  19. }
  20. - (IBAction)ValueChanged:(id)sender {
  21. self.labelTime.text =[self.formatter stringFromDate:self.datePicker.date];
  22. }
  23. - (IBAction)onSetDateClick:(id)sender {
  24. if(self.blk_Set)
  25. self.blk_Set([self.formatter stringFromDate:self.datePicker.date]);
  26. [self.navigationController popViewControllerAnimated:false];
  27. }
  28. - (void)viewDidLoad
  29. {
  30. [super viewDidLoad];
  31. self.title = @"";
  32. // Do any additional setup after loading the view.
  33. self.datePicker.datePickerMode = self.pickerMode;
  34. //self.datePicla
  35. self.datePicker.date = self.date;
  36. self.labelTime.text =[self.formatter stringFromDate:self.date];
  37. }
  38. - (void)didReceiveMemoryWarning
  39. {
  40. [super didReceiveMemoryWarning];
  41. // Dispose of any resources that can be recreated.
  42. }
  43. /*
  44. #pragma mark - Navigation
  45. // In a storyboard-based application, you will often want to do a little preparation before navigation
  46. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  47. {
  48. // Get the new view controller using [segue destinationViewController].
  49. // Pass the selected object to the new view controller.
  50. }
  51. */
  52. @end