Minimum and maximum date in UIDatePicker

Try this: NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDate *currentDate = [NSDate date]; NSDateComponents *comps = [[NSDateComponents alloc] init]; [comps setYear:-18]; NSDate *minDate = [gregorian dateByAddingComponents:comps toDate:currentDate options:0]; [comps setYear:-150]; NSDate *maxDate = [gregorian dateByAddingComponents:comps toDate:currentDate options:0]; [comps release]; self.datePicker.minimumDate = minDate; self.datePicker.maximumDate = maxDate; It may be easily translated to Swift 4.2: let calendar … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)