UIDatePicker *picker        =   [[UIDatePicker alloc]initWithFrame:CGRectMake(0, 0,[UIParam widthScreen] ,50 )];
    
    picker.minimumDate          =   [NSDate date];
    picker.maximumDate          =   nil;
    picker.backgroundColor      =   [UIColor whiteColor];
    picker.layer.borderColor    =   [kUIColor(238, 238,238) CGColor];
    picker.layer.borderWidth    =   1;
    [picker addTarget:self action:@selector(dateChange:) forControlEvents:UIControlEventValueChanged];
    NSLocale *locale            =   [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"];
    
    picker.locale               =   locale;
    
    //设置日期的显示格式
    picker.datePickerMode       =   UIDatePickerModeDateAndTime;

 

相关文章:

  • 2021-10-19
  • 2021-11-05
  • 2022-12-23
  • 2021-12-15
  • 2021-12-15
  • 2021-12-28
  • 2021-08-18
猜你喜欢
  • 2021-12-05
  • 2021-12-14
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-14
相关资源
相似解决方案