-
Notifications
You must be signed in to change notification settings - Fork 1
Date Picker Dialog
levching edited this page Apr 15, 2020
·
3 revisions
The AN_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.Android.App;
...
var date = DateTime.Now;
int year = date.Year;
int month = date.Month - 1; //Compatibility with Android Calendar..
int day = date.Day;
AN_DatePickerDialog picker = new AN_DatePickerDialog(year, month, day);
picker.Show((result) => {
if(result.IsSucceeded) {
Debug.Log("date picked result.Year: " + result.Year);
//Same Android Calendar Compatibility
Debug.Log("date picked result.Month: " + result.Month + 1);
Debug.Log("date picked result.Day: " + result.Day);
} else {
Debug.Log("Failed to pick a date: " + result.Error.FullMessage);
}
});Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Build Info
- Dark Mode
- Package Info
- Runtime Permissions
- Run External App
- Immersive Mode
- PackageManager
- Popups & Preloaders
- Rate Us Dialog
- Activity
- Intent
- Settings Page
- Media Player
- Date Picker Dialog
- Time Picker Dialog
- Locale
- Wheel Picker Dialog
- Developer Console Setup
- Connecting to The Service
- Purchase Flow
- Transactions Validation
- Subscriptions
- Licensing
- Getting Started
- Games Sing-in
- Server-side API Access
- Leaderboards
- Achievements
- Saved Games
- Image Manager
- Settings Intent