SHARE
TWEET

Untitled

a guest Aug 19th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var datePicker:UIdatePicker
  2. func dateselcted()
  3. {
  4.     var date:NSDate = NSDate()
  5.     datePicker.minimumdate = date
  6.     if cell.dateText.characters.count == 0
  7.     {
  8.         //If user not select any date I am showing current date  and working fine
  9.         var dateOb:AnyObject =
  10.         datePicker.setdate(date ,animated:false)
  11.     }
  12.     else
  13.     {
  14.         // Suppose user select DEC 20 2015 storing this date in one object example below and working fine but it is fails when scroll datepicker wheel very fast then it is showing the other date how to show "DEC 20 2015 " when picker wheel scrolls fastly I want to show date what I selected
  15.  
  16.         var dateOb:AnyObject = DEC 20 2015
  17.         datePicker.setdate( dateOb as nsdate ,animated:false)
  18.     }    
  19. }
  20.      
  21. pickerView:didSelectRow:inComponent:
  22.      
  23. datePicker.date = [NSDate date];
  24. datePicker.date = date;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top