Linked Questions

Popular Questions

pop up date picker to set a date

Asked by At

I want to make a pop-up date picker (DATE ONLY) when a user clicks on a button and set the selected date in my code.

NSDateComponents *comps = [[NSDateComponents alloc] init];
[comps setDay:8];
[comps setMonth:9];
[comps setYear:2018];
NSDate *earlier = [[NSCalendar currentCalendar] dateFromComponents:comps];

I can manually set a date by typing like this but I don't know how to set the date from the date picker. How do I do it?

Related Questions