Date Picker Dialog - StansAssets/com.stansassets.ultimate-mobile GitHub Wiki
The UM_DatePickerDialog is a simple dialog containing native DatePicker component inside that will allow your app user to pick a date. See the use example below:
using System;
using UnityEngine;
using SA.CrossPlatform.UI;
...
int year = DateTime.Now.Year;
var picker = new UM_DatePickerDialog(year);
picker.Show((result) => {
if (result.IsSucceeded) {
Debug.Log("date picked result.Year: " + result.Date.Year);
Debug.Log("date picked result.Month: " + result.Date.Month);
Debug.Log("date picked result.Day: " + result.Date.Day);
} else {
Debug.Log("Failed to pick a date: " + result.Error.FullMessage);
}
});
Note: When testing inside the Unity Editor environmnet the DateTime.Now value will be returned as user date choise.