DatePickerViewController.m 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.labelTime.text);
  26. [self.navigationController popViewControllerAnimated:false];
  27. }
  28. - (void)viewDidLoad
  29. {
  30. [super viewDidLoad];
  31. // Do any additional setup after loading the view.
  32. self.datePicker.datePickerMode = self.pickerMode;
  33. //self.datePicla
  34. self.datePicker.date = self.date;
  35. self.labelTime.text =[self.formatter stringFromDate:self.date];
  36. }
  37. - (void)didReceiveMemoryWarning
  38. {
  39. [super didReceiveMemoryWarning];
  40. // Dispose of any resources that can be recreated.
  41. }
  42. /*
  43. #pragma mark - Navigation
  44. // In a storyboard-based application, you will often want to do a little preparation before navigation
  45. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  46. {
  47. // Get the new view controller using [segue destinationViewController].
  48. // Pass the selected object to the new view controller.
  49. }
  50. */
  51. @end