Yogesh Jadhav
Yogesh Jadhav

Reputation: 53

DatePicker in iphone not showing year (swift)

i have one question, I want to get Year/Month/Day And Time from date picker but year is not shows in date picker,how can i get any year from date picker like user want

Example - i want 2015-02-03 or any year

Upvotes: 4

Views: 1854

Answers (3)

SteveFerg
SteveFerg

Reputation: 3580

Do two date pickers, side by side. One with the mode set in the Attributes inspector as "date". The second one with the mode set as "time".

Upvotes: 0

Vaibhav Jhaveri
Vaibhav Jhaveri

Reputation: 1605

To get Year/Month/Day And Time, you can use UIPickerView with multiple components

Upvotes: 0

CherryCoda
CherryCoda

Reputation: 53

You can show the year using UIDatePickerMode.Date but this will display the year/month/day. The time will not be displayed

Upvotes: 1

Related Questions