Date Time Picker

You can use native IOS  Date Time Picker when you want your player to pick a date, time or delay. Available picker options are listed inside the ISN_UIDateTimePickerMode enum.

The following code snippet demonstrates how to show a date picker:

using SA.iOS.UIKit;
...
ISN_UIDateTimePickerMode mode = ISN_UIDateTimePickerMode.DateAndTime;
ISN_UIDateTimePicker.Show(mode, (DateTime date) => {
    Debug.Log("User picked date: " + date.ToLongDateString());
});

 You can also specify a starting date:

using SA.iOS.UIKit;
...
DateTime starDate = DateTime.Now;
ISN_UIDateTimePickerMode mode = ISN_UIDateTimePickerMode.DateAndTime;
ISN_UIDateTimePicker.Show(mode, starDate, (DateTime date) => {
    Debug.Log("User picked date: " + date.ToLongDateString());
});

 In case you want to track intermediate values while a user is picking a date you may subscribe to OnPickerDateChanged event

See the example below:

ISN_UIDateTimePicker.OnPickerDateChanged.AddListener((DateTime date) => {
    Debug.Log("User chnaged a date to: " + date.ToLongDateString());
});

API Reference

ISN_UIDateTimePicker

namespace SA.iOS.UIKit {
	public static class ISN_UIDateTimePicker  {
		

		//--------------------------------------
		// Public Methods
		//--------------------------------------

		/// <summary>
		/// Displays DateTimePickerUI with DateTimePicker Mode.
		///
		///<param name="mode">An object that contains the IOSDateTimePicker mode.</param>
		/// </summary>	
		public static void Show(ISN_UIDateTimePickerMode mode, Action<DateTime> callback);

		/// <summary>
		/// Displays DateTimePickerUI with DateTimePicker Mode and pre-set date.
		///
		///<param name="mode">An object that contains the IOSDateTimePicker mode</param>
		///<param name="name">An object DateTime that contains pre-set date</param>
		/// </summary>
		public static void Show(ISN_UIDateTimePickerMode mode, DateTime dateTime, Action<DateTime> callback);

        //--------------------------------------
        // Events
        //--------------------------------------

		/// <summary>
        /// The event is fired every time user chnages the date while using picker in any mode
        /// </summary>
        public static SA_iEvent<DateTime> OnPickerDateChanged;
	}
}

ISN_UIDateTimePickerMode

namespace SA.iOS.UIKit {
	public enum ISN_UIDateTimePickerMode  {
		
		// Displays hour, minute, and optionally AM/PM designation depending on the locale setting (e.g. 6 | 53 | PM)
		Time = 1, 

		// Displays month, day, and year depending on the locale setting (e.g. November | 15 | 2007)
		Date = 2, 

		// Displays date, hour, minute, and optionally AM/PM designation depending on the locale setting (e.g. Wed Nov 15 | 6 | 53 | PM)
		DateAndTime = 3, 
		
		// Displays hour and minute (e.g. 1 | 53)
		CountdownTimer = 4 
	}
}