if (_providerDatePicker) _providerDatePicker.hidden =
!_providerDatePicker.hidden; if (_providerToolbar)
_providerToolbar.hidden = !_providerToolbar.hidden; float screenWidth = [UIScreen mainScreen].bounds.size.width;
_providerToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height - 244, self. view.bounds.size.width,
44)];
UIBarButtonItem *done = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self
action:@selector(dismissActionSheet:)];
_providerToolbar.items = @[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil action:nil], done];
_providerToolbar.barStyle = UIBarStyleBlackOpaque; [self.view addSubview:_providerToolbar];
_providerDatePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height - 200,
screenWidth, 200.0f)];
_providerDatePicker.backgroundColor = [UIColor whiteColor];
_providerDatePicker.datePickerMode = UIDatePickerModeDate; // [_providerDatePicker setLocale:[[NSLocale alloc]
initWithLocaleIdentifier:@"US"]];
_providerDatePicker.date = [NSDate date];
I am using method in button action to show DatePicker but it is Comming but it show like shown in image. I want to change it to DD/MM/YY. Help me in this?