Ver Fonte

增加大屏的登录以及其他模块

“hujiajun” há 2 meses atrás
pai
commit
51c23a20d5
100 ficheiros alterados com 3184 adições e 9 exclusões
  1. 1 0
      Assets/1.txt
  2. 1 1
      Assets/1.txt.meta
  3. 67 0
      Assets/AesEncryption.cs
  4. 1 1
      Assets/AesEncryption.cs.meta
  5. 1 1
      Assets/Bitsplash.meta
  6. 1 1
      Assets/Bitsplash/Modular Date Picker.meta
  7. 1 1
      Assets/Bitsplash/Modular Date Picker/Base.meta
  8. 1 1
      Assets/Bitsplash/Modular Date Picker/Base/Editor.meta
  9. 50 0
      Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs
  10. 1 1
      Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs.meta
  11. 8 0
      Assets/Bitsplash/Modular Date Picker/Base/Script.meta
  12. 12 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs
  13. 1 1
      Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs.meta
  14. 8 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Cell.meta
  15. 78 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs
  16. 1 1
      Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs.meta
  17. 145 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs
  18. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs.meta
  19. 8 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker.meta
  20. 244 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs
  21. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs.meta
  22. 190 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs
  23. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs.meta
  24. 464 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs
  25. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs.meta
  26. 15 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs
  27. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs.meta
  28. 20 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs
  29. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs.meta
  30. 20 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs
  31. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs.meta
  32. 20 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs
  33. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs.meta
  34. 66 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs
  35. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs.meta
  36. 14 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs
  37. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs.meta
  38. 14 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs
  39. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs.meta
  40. 67 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs
  41. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs.meta
  42. 24 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs
  43. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs.meta
  44. 126 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs
  45. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs.meta
  46. 8 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown.meta
  47. 23 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs
  48. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs.meta
  49. 159 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDownBase.cs
  50. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDownBase.cs.meta
  51. 8 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Editor.meta
  52. 151 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Editor/DatePickerSettingsEditor.cs
  53. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Editor/DatePickerSettingsEditor.cs.meta
  54. 8 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements.meta
  55. 45 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerButton.cs
  56. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerButton.cs.meta
  57. 220 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerText.cs
  58. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerText.cs.meta
  59. 70 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/MonthTextBox.cs
  60. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/MonthTextBox.cs.meta
  61. 21 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextMonthButton.cs
  62. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextMonthButton.cs.meta
  63. 21 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextYearButton.cs
  64. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextYearButton.cs.meta
  65. 20 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevMonthButton.cs
  66. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevMonthButton.cs.meta
  67. 20 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevYearButton.cs
  68. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevYearButton.cs.meta
  69. 64 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/SelectionTextBox.cs
  70. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/SelectionTextBox.cs.meta
  71. 22 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/TodayButton.cs
  72. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/TodayButton.cs.meta
  73. 18 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/YearCombo.cs
  74. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/YearCombo.cs.meta
  75. 8 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums.meta
  76. 15 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/DatePickerCulture.cs
  77. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/DatePickerCulture.cs.meta
  78. 19 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/FrameLayout.cs
  79. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/FrameLayout.cs.meta
  80. 14 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TextTypeEnum.cs
  81. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TextTypeEnum.cs.meta
  82. 16 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleButtons.cs
  83. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleButtons.cs.meta
  84. 15 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleDate.cs
  85. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleDate.cs.meta
  86. 16 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleLayout.cs
  87. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleLayout.cs.meta
  88. 25 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/WeekDaysLayout.cs
  89. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/WeekDaysLayout.cs.meta
  90. 17 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerPrivate.cs
  91. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerPrivate.cs.meta
  92. 14 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerSettingsItem.cs
  93. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerSettingsItem.cs.meta
  94. 13 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/IDateTimeItem.cs
  95. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/IDateTimeItem.cs.meta
  96. 6 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/MonoBehvaiour.cs
  97. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/MonoBehvaiour.cs.meta
  98. 14 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/MultipleSelectionInputValue.cs
  99. 11 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/MultipleSelectionInputValue.cs.meta
  100. 15 0
      Assets/Bitsplash/Modular Date Picker/Base/Script/SelectionType.cs

+ 1 - 0
Assets/1.txt

@@ -0,0 +1 @@
+一二三四五六七八九十月年日星期1234567890选择日期

+ 1 - 1
Assets/TriLib/TriLibCore/KnownIssues.txt.meta → Assets/1.txt.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: ff4558089a8720148825b5c0660970d2
+guid: 6a906c4869c1844c8a553de234e701d4
 TextScriptImporter:
   externalObjects: {}
   userData: 

+ 67 - 0
Assets/AesEncryption.cs

@@ -0,0 +1,67 @@
+using System;
+using System.IO;
+using System.Linq;
+using System.Net.NetworkInformation;
+using System.Security.Cryptography;
+using System.Text;
+using UnityEngine;
+
+public class AesEncryption : MonoBehaviour
+{
+
+    private void Start()
+    {
+        string encrypted = Encrypt("cyx");
+        Debug.Log("Encrypted: " + encrypted);
+        string decrypted = Decrypt(encrypted);
+        Debug.Log("Decrypted: " + decrypted);
+
+    }
+    private static readonly string key = "1234asdf1234asdf"; // 必须是16, 24或32字符长
+    private static readonly string iv = "1234asdf1234asdf"; // 必须是16字符长
+
+    public static string Encrypt(string plainText)
+    {
+        using (Aes aesAlg = Aes.Create())
+        {
+            aesAlg.Key = Encoding.UTF8.GetBytes(key);
+            aesAlg.IV = Encoding.UTF8.GetBytes(iv);
+            ICryptoTransform encryptor = aesAlg.CreateEncryptor();
+
+            using (MemoryStream msEncrypt = new MemoryStream())
+            {
+                using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
+                {
+                    using (StreamWriter swEncrypt = new StreamWriter(csEncrypt))
+                    {
+                        swEncrypt.Write(plainText);
+                    }
+                    byte[] encrypted = msEncrypt.ToArray();
+                    return Convert.ToBase64String(encrypted);
+                }
+            }
+        }
+    }
+
+    public static string Decrypt(string cipherText)
+    {
+        using (Aes aesAlg = Aes.Create())
+        {
+            aesAlg.Key = Encoding.UTF8.GetBytes(key);
+            aesAlg.IV = Encoding.UTF8.GetBytes(iv);
+
+            ICryptoTransform decryptor = aesAlg.CreateDecryptor();
+
+            using (MemoryStream msDecrypt = new MemoryStream(Convert.FromBase64String(cipherText)))
+            {
+                using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
+                {
+                    using (StreamReader srDecrypt = new StreamReader(csDecrypt))
+                    {
+                        return srDecrypt.ReadToEnd();
+                    }
+                }
+            }
+        }
+    }
+}

+ 1 - 1
Assets/TriLib/TriLibCore/Editor/Scripts/BuildProcessor.cs.meta → Assets/AesEncryption.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: d556beac2d22e38459a0060666d79950
+guid: 2366655efc42e4dda82d30b4d07b7404
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/TriLib.meta → Assets/Bitsplash.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: e886adbe491c7ab41ba8e82658acbe78
+guid: b97e3b4789dce488ebde1a228e4f99ce
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 1 - 1
Assets/TriLib/TriLibCore.meta → Assets/Bitsplash/Modular Date Picker.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 1b8b64140ddec434b9ed4abe6a36c0a0
+guid: d01b5210b28304fe5bb1d1a336b50e6f
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 1 - 1
Assets/TriLib/TriLibCore/Editor/Scripts.meta → Assets/Bitsplash/Modular Date Picker/Base.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: d678ca13b18d6c14da3d0f0f31d422a9
+guid: dd9c40c69d2ff0d468bd5811d09bd0d1
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 1 - 1
Assets/TriLib/TriLibCore/Editor.meta → Assets/Bitsplash/Modular Date Picker/Base/Editor.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 8e0c0a32eb8819f4cb8869483da839ee
+guid: 4664c16ec00c057459379ec8124e229f
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 50 - 0
Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs

@@ -0,0 +1,50 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEditor;
+using UnityEngine;
+
+public class EditorMenu
+{
+    private static void InstanciateCanvas(string path)
+    {
+        Canvas[] canvases = GameObject.FindObjectsOfType<Canvas>();
+        if (canvases == null || canvases.Length == 0)
+        {
+            EditorUtility.DisplayDialog("No canvas in scene", "Please add a canvas to the scene and try again", "Ok");
+            return;
+        }
+        Canvas canvas = null;
+        foreach (Canvas c in canvases)
+        {
+            if (c.transform.parent == null)
+            {
+                canvas = c;
+                break;
+            }
+        }
+
+        if (canvas == null)
+        {
+            EditorUtility.DisplayDialog("No canvas in scene", "Please add a canvas to the scene and try again", "Ok");
+            return;
+        }
+        GameObject obj = Resources.Load<GameObject>(path);
+        GameObject newObj = (GameObject)GameObject.Instantiate(obj);
+        newObj.transform.SetParent(canvas.transform, false);
+        newObj.name = newObj.name.Replace("(Clone)", "");
+        Undo.RegisterCreatedObjectUndo(newObj, "Create Object");
+    }
+
+
+    [MenuItem("Tools/Date Picker/Light Theme")]
+    public static void AddLightTheme()
+    {
+        InstanciateCanvas("MenuPrefabs/MenuLight");
+    }
+
+    [MenuItem("Tools/Date Picker/Dark Theme")]
+    public static void AddDarkTheme()
+    {
+        InstanciateCanvas("MenuPrefabs/MenuDark");
+    }
+}

+ 1 - 1
Assets/TriLib/TriLibCore/Editor/Scripts/CheckMappers.cs.meta → Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 19aa55894ca34a84db70e98de607f5da
+guid: 81f0f1ae76414204b9fbccc3116b2ccb
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 8 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c7c7633203ecd45469316a291a0b5385
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 12 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    class Calendar
+    {
+    }
+}

+ 1 - 1
Assets/TriLib/TriLibCore/Editor/Scripts/LipSyncMappingEditor.cs.meta → Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 4660b91c10b46834391a27f679f07187
+guid: 5522f7b0412313140b60210c2cdd74f0
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 8 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Cell.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0511f4a08fc16af4bbe4f7b51d00ce64
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 78 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs

@@ -0,0 +1,78 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.EventSystems;
+
+namespace Bitsplash.DatePicker
+{
+    public class CellAddon : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler,IBeginDragHandler,IEndDragHandler,IDragHandler,IPointerDownHandler
+    {
+        DatePickerContent mParent;
+        int mChildIndex;
+
+        public void OnBeginDrag(PointerEventData eventData)
+        {
+            if (mParent != null)
+                ((IDatePickerPrivate)mParent).RaiseStartSelection(mChildIndex);
+        }
+
+        public void OnDrag(PointerEventData eventData)
+        {
+         
+        }
+
+        public void OnEndDrag(PointerEventData eventData)
+        {
+            if (mParent != null)
+                ((IDatePickerPrivate)mParent).EndSelection();
+        }
+
+        public void OnPointerClick(PointerEventData eventData)
+        {
+
+        }
+
+        public void OnPointerDown(PointerEventData eventData)
+        {
+            if (mParent != null)
+                ((IDatePickerPrivate)mParent).RaiseClick(mChildIndex);
+        }
+
+        public void OnPointerEnter(PointerEventData eventData)
+        {
+            if (eventData.pointerDrag != null)
+            {
+                var cellAddon = eventData.pointerDrag.GetComponent<CellAddon>();
+                if (cellAddon != null && mParent != null)
+                    ((IDatePickerPrivate)mParent).RaiseSelectionEnter(mChildIndex, cellAddon.mChildIndex);
+            }
+        }
+
+        public void OnPointerExit(PointerEventData eventData)
+        {
+            if (eventData.pointerDrag != null)
+            {
+                var cellAddon = eventData.pointerDrag.GetComponent<CellAddon>();
+                if (cellAddon != null && mParent != null)
+                    ((IDatePickerPrivate)mParent).RaiseSelectionExit(mChildIndex, cellAddon.mChildIndex);
+            }
+        }
+
+        public void SetParent(DatePickerContent parent,int childIndex)
+        {
+            mParent = parent;
+            mChildIndex = childIndex;
+        }
+        // Start is called before the first frame update
+        void Start()
+        {
+
+        }
+
+        // Update is called once per frame
+        void Update()
+        {
+
+        }
+    }
+}

+ 1 - 1
Assets/TriLib/TriLibCore/Editor/Scripts/MapperContextActions.cs.meta → Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 222f79d3cf134a44483e2a2122cec110
+guid: e3355eceaf15fbb41b9a55f5f8839175
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 145 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs

@@ -0,0 +1,145 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Bitsplash
+{
+    class CommonMethods
+    {
+        public static readonly Rect UVAbsolute = new Rect(0f, 0f, 1f, 1f);
+        internal static T EnsureComponent<T>(GameObject obj,bool hide = false) where T : Component
+        {
+            T comp = obj.GetComponent<T>();
+            if (comp == null)
+                comp = obj.AddComponent<T>();
+            if (Application.isPlaying == false && Application.isEditor == true)
+            {
+              //  comp.tag = "EditorOnly";
+                comp.hideFlags = HideFlags.DontSaveInEditor;
+            }
+            return comp;
+        }
+
+        public static void HideObject(GameObject obj)
+        {
+            if (Application.isPlaying == false && Application.isEditor == true)
+            {
+                obj.tag = "EditorOnly";
+                obj.hideFlags = HideFlags.DontSaveInEditor;
+            }
+            obj.hideFlags = obj.hideFlags | HideFlags.HideInHierarchy | HideFlags.HideInInspector;
+        }
+        
+        public static void SafeDestroy( UnityEngine.Object obj)
+        {
+            if (obj == null)
+                return;
+            if (Application.isEditor && Application.isPlaying == false)
+                UnityEngine.Object.DestroyImmediate(obj);
+            else
+                UnityEngine.Object.Destroy(obj);
+            obj = null;
+
+        }
+        public static Rect HorizontalTextureTile(float amount)
+        {
+            return new Rect(0f, 0f, amount, 1f);
+        }
+        public static Rect VerticalTextureTile(float amount)
+        {
+            return new Rect(0f, 0f,1f, amount);
+        }
+
+        public static float InterpolateInRectX(float v,Rect r)
+        {
+            return r.x + v * r.width;
+        }
+        public static float InterpolateInRectY(float v, Rect r)
+        {
+            return r.y + v * r.height;
+        }
+
+        public static Vector2 InterpolateInRect(Vector2 v,Rect r)
+        {
+            return new Vector2(r.x + v.x * r.width, r.y + v.y * r.height);
+        }
+        public static void DrawVertical(float x, Rect bounds, float thickness, Rect uv, Color color, VertexHelper vh)
+        {
+            Rect r = new Rect(x-thickness*0.5f, bounds.y, thickness,bounds.height);
+            DrawRect(r, uv, color, vh);
+        }
+
+        public static void DrawHorizontal(float y,Rect bounds,float thickness,Rect uv, Color color,VertexHelper vh)
+        {
+            Rect r = new Rect(bounds.x, y - thickness * 0.5f, bounds.width, thickness);
+            DrawRect(r, uv, color, vh);
+        }
+        public static void DrawRect(Rect rect,Rect uv,Color color,VertexHelper vh)
+        {
+            int index = vh.currentVertCount;
+            vh.AddVert(new Vector3(rect.xMin, rect.yMin, 0f), color, new Vector2(uv.xMin, uv.yMin));
+            vh.AddVert(new Vector3(rect.xMin, rect.yMax, 0f), color, new Vector2(uv.xMin, uv.yMax));
+            vh.AddVert(new Vector3(rect.xMax, rect.yMax, 0f), color, new Vector2(uv.xMax, uv.yMax));
+            vh.AddVert(new Vector3(rect.xMax, rect.yMin, 0f), color, new Vector2(uv.xMax, uv.yMin));
+            vh.AddTriangle(index, index+ 1, index+2);
+            vh.AddTriangle(index+2, index+3, index);
+        }
+        public static bool IsRangeSelected(DateTime from, DateTime to, HashSet<DateTime> selection)
+        {
+            from = from.Date;
+            to = to.Date;
+            if (from == to)
+            {
+                return selection.Count == 1 && selection.Contains(from);
+            }
+            if (from > to)
+            {
+                DateTime tmp = from;
+                from = to;
+                to = tmp;
+            }
+
+            DateTime iterator = from;
+            int count = 0;
+            while (iterator <= to)
+            {
+                if (selection.Contains(iterator.Date) == false)
+                    return false;
+                count++;
+                iterator += TimeSpan.FromDays(1);
+            }
+            if (selection.Count != count)
+                return false;
+            return true;
+        }
+        public static void SelectRange(DateTime from, DateTime to, HashSet<DateTime> selection)
+        {
+            selection.Clear();
+            from = from.Date;
+            to = to.Date;
+            if (from == to)
+            {
+                selection.Add(from);
+                return;
+            }
+            if (from > to)
+            {
+                DateTime tmp = from;
+                from = to;
+                to = tmp;
+            }
+
+            DateTime iterator = from;
+            while (iterator <= to)
+            {
+                selection.Add(iterator.Date);
+                iterator += TimeSpan.FromDays(1);
+            }
+        }
+
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9ed3373f404cfdb41971280286fab7b2
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 09a8fdbf9b2de994c813d6dd6f8c84a0
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 244 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs

@@ -0,0 +1,244 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public partial class DatePickerContent : IDatePickerPrivate
+    {
+        DateTime? mSelectionFirst;
+        DateTime? mDragFirst;
+        DateTime? mDragTo;
+
+        HashSet<DateTime> mDragSelectionRange = new HashSet<DateTime>();
+        bool mDragSelectionChanged = false;
+
+
+        Dictionary<DateTime, Color> mMarkerColors = new Dictionary<DateTime, Color>();
+        public void SetAllMarkerColors(Dictionary<DateTime, Color> markers)
+        {
+            
+            mMarkerColors.Clear();
+            foreach (var pair in markers)
+                mMarkerColors.Add(pair.Key.Date, pair.Value);
+            RefreshSelection();
+        }
+        public void SetMarkerColor(DateTime date, Color color)
+        {
+            mMarkerColors[date.Date] = color;
+            RefreshSelection();
+        }
+        public void ClearMarker(DateTime date)
+        {
+            mMarkerColors.Remove(date.Date);
+            RefreshSelection();
+        }
+        public void ClearMarkerColor()
+        {
+            mMarkerColors.Clear();
+            RefreshSelection();
+            
+        }
+        void SelectOne(DateTime date)
+        {
+            mSelection.SelectOne(date);
+            mSelectionFirst = date;
+        }
+
+        void ToogleOne(DateTime date)
+        {
+            if (mSelection.IsSingleDateSelected(date) && AllowEmptySelection)
+            {
+                mSelection.Clear();
+                mSelectionFirst = null;
+            }
+            else
+                SelectOne(date);   
+        }
+        void UpdateSelection()
+        {
+            if(mDragSelectionChanged || ((IDatePickerCollectionPrivate) mSelection).Changed)
+            {
+                ((IDatePickerCollectionPrivate)mSelection).Changed = false;
+                mDragSelectionChanged = false;
+                RefreshSelection();
+            }
+        }
+        void RefreshSelection()
+        {
+            for (int i = 0; i < mCells.Length; i++)
+            {
+                var date = mCells[i].DayValue.Date;
+                bool withinMonth = date.Month == DisplayDate.Month && date.Year == DisplayDate.Year;
+                Color markerColor;
+                if (mMarkerColors.TryGetValue(date, out markerColor) == false)
+                    markerColor = new Color(0f, 0f, 0f, 0f);
+                if (mCells[i].MarkerColor != markerColor)
+                    mCells[i].MarkerColor = markerColor;
+                if ((mSelection.Contains(date) || mDragSelectionRange.Contains(date)) && withinMonth)
+                {
+                    if (mCells[i].CellSelected == false)
+                        mCells[i].CellSelected = true;
+                }
+                else
+                {
+                    if(mCells[i].CellSelected == true)
+                        mCells[i].CellSelected = false;
+                }
+            }
+        }
+
+        void LimitRangeToMonth(HashSet<DateTime> selection,DateTime month)
+        {
+            selection.RemoveWhere((x) => x.Month != month.Month || x.Year != month.Year);
+        }
+
+
+        void SelectRange(DateTime from,DateTime to)
+        {
+            mSelection.SelectRange(from, to);
+        }
+
+        void ToogleMultiple(DateTime date)
+        {
+            if (mSelection.Contains(date))
+            {
+                if (mSelection.Count > 1 || AllowEmptySelection)
+                    mSelection.Remove(date);
+            }
+            else
+            {
+                mSelection.Add(date);
+            }
+        }
+
+        void ConnectSelection(DateTime date)
+        {
+            date = date.Date;
+            if (mSelection.Contains(date)) // already within the selection
+                return;
+            if(mSelection.Count == 0 || mSelectionFirst.HasValue == false)
+            {
+                SelectOne(date);
+                return;
+            }
+            SelectRange(mSelectionFirst.Value, date);
+        }
+
+        void ProcessRangeClick(DatePickerCell cell, int cellChildIndex)
+        {
+            if (mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Append)
+                ConnectSelection(cell.DayValue);
+            else if (mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Singular)
+                ToogleOne(cell.DayValue);
+        }
+
+        void ProcessMultipleClick(DatePickerCell cell, int cellChildIndex)
+        {
+            if (mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Append)
+                ToogleMultiple(cell.DayValue);
+            else if (mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Singular)
+                ToogleOne(cell.DayValue);
+        }
+        void ProcessSelectionClick(DatePickerCell cell,int cellChildIndex)
+        {
+            switch (SelectionMode)
+            {
+                case SelectionType.Single:
+                    ToogleOne(cell.DayValue);
+                    break;
+                case SelectionType.Range:
+                    ProcessRangeClick(cell, cellChildIndex);
+                    break;
+                case SelectionType.Multiple:
+                    ProcessMultipleClick(cell, cellChildIndex);
+                    break;
+            }
+        }
+
+        protected virtual void OnCellClick(DatePickerCell cell, int cellChildIndex)
+        {
+            if (cell.CellEnabled == false)
+                return;
+            if (mDragFirst.HasValue || mDragTo.HasValue)
+                return;
+            ProcessSelectionClick(cell, cellChildIndex);
+        }
+
+        void RaiseSelectionChanged()
+        {
+            if (OnSelectionChanged != null)
+                OnSelectionChanged.Invoke();
+        }
+        void IDatePickerPrivate.RaiseClick(int childIndex)
+        {
+            OnCellClick(mCells[childIndex], childIndex);
+        }
+
+        void IDatePickerPrivate.RaiseStartSelection(int childIndex)
+        {
+            if (SelectionMode == SelectionType.Single)
+                return;
+            DateTime dayValue = mCells[childIndex].DayValue;
+            if (SelectionMode == SelectionType.Range || (SelectionMode == SelectionType.Multiple && mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Singular))
+                mSelection.SelectOne(dayValue);
+            mDragFirst = dayValue;
+            if (mDragTo.HasValue && mDragFirst.HasValue)
+            {
+                CommonMethods.SelectRange(mDragTo.Value, mDragFirst.Value, mDragSelectionRange);
+            }
+            else
+            {
+                mDragSelectionRange.Clear();
+                mDragSelectionRange.Add(dayValue);
+            }
+            mSelectionFirst = null;
+            LimitRangeToMonth(mDragSelectionRange, mMonthFirst);
+            mDragSelectionChanged = true;
+        }
+
+        void IDatePickerPrivate.EndSelection()
+        {
+            if (SelectionMode == SelectionType.Single)
+                return;
+            if (mDragTo.HasValue && mDragFirst.HasValue)
+            {
+                CommonMethods.SelectRange(mDragTo.Value, mDragFirst.Value, mDragSelectionRange);
+                LimitRangeToMonth(mDragSelectionRange, mMonthFirst);
+                mSelection.AddItems(mDragSelectionRange);
+            }
+            mDragSelectionRange.Clear();
+            mDragSelectionChanged = true;
+            mDragTo = null;
+            mDragFirst = null;
+        }
+
+        void IDatePickerPrivate.RaiseSelectionEnter(int childIndex, int fromChildIndex)
+        {
+            if (SelectionMode == SelectionType.Single)
+                return;
+            mSelectionFirst = null;
+            mDragTo = mCells[childIndex].DayValue;
+            if (mDragTo.HasValue && mDragFirst.HasValue)
+            {
+                CommonMethods.SelectRange(mDragTo.Value, mDragFirst.Value, mDragSelectionRange);
+                LimitRangeToMonth(mDragSelectionRange, mMonthFirst);
+            }
+            mDragSelectionChanged = true;
+        }
+
+        void IDatePickerPrivate.RaiseSelectionExit(int childIndex, int fromChildIndex)
+        {
+            if (SelectionMode == SelectionType.Single)
+                return;
+//            if (mDragTo.HasValue && mDragTo.Value == mCells[childIndex].DayValue)
+//                mDragTo = null;
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7503219deb4b33f4e9303c6234e05568
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 190 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs

@@ -0,0 +1,190 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{ 
+    /// <summary>
+    /// holds dates selected by the date picker
+    /// </summary>
+    public class DatePickerCollection : IDatePickerCollectionPrivate
+    {
+        bool mInvalid = false;
+        HashSet<DateTime> mData = new HashSet<DateTime>();
+        bool mChanged = false;
+        bool mAllowEmpty = false;
+
+        DateTime[] mItems;
+
+        bool IDatePickerCollectionPrivate.Changed { get { return mChanged; } set { mChanged = value; } }
+
+        bool IDatePickerCollectionPrivate.AllowEmpty { get { return mAllowEmpty; } set
+            {
+                mAllowEmpty = value;
+                if(mAllowEmpty == false && mData.Count ==0)
+                {
+                    ValidateNonEmpty();
+                    Invalidate();
+                }
+            }
+        }
+
+        event Action InnerSelectionModified;
+
+        event Action IDatePickerCollectionPrivate.SelectionModified
+        {
+            add
+            {
+                InnerSelectionModified += value;
+            }
+
+            remove
+            {
+                InnerSelectionModified -= value;
+            }
+        }
+
+        public int Count
+        {
+            get { return mData.Count; }
+        }
+
+        /// <summary>
+        /// selects a range of dates , clearing all other dates
+        /// </summary>
+        /// <param name="from"></param>
+        /// <param name="to"></param>
+        public void SelectRange(DateTime from,DateTime to)
+        {
+            if (CommonMethods.IsRangeSelected(from, to, mData))
+                return;
+            CommonMethods.SelectRange(from, to, mData);
+            Invalidate();
+        }
+
+        void Invalidate()
+        {
+            mChanged = true;
+            mInvalid = true;
+            if (InnerSelectionModified != null)
+                InnerSelectionModified();
+        }
+
+        /// <summary>
+        /// returns true if a date is the only date selected
+        /// </summary>
+        /// <param name="date"></param>
+        /// <returns></returns>
+        public bool IsSingleDateSelected(DateTime date)
+        {
+            date = date.Date;
+            if (mData.Contains(date) && mData.Count == 1)
+                return true;
+            return false;
+        }
+
+        /// <summary>
+        /// selects one date clearing all other dates
+        /// </summary>
+        /// <param name="date"></param>
+        public void SelectOne(DateTime date)
+        {
+            date = date.Date;
+            if (mData.Contains(date) && mData.Count == 1)
+                return;
+
+            mData.Clear();
+            Add(date);
+        }
+
+        void ValidateNonEmpty()
+        {
+            if (mAllowEmpty == false && mData.Count == 0)
+                mData.Add(DateTime.Today.Date);
+        }
+
+        /// <summary>
+        /// clears all selected dates. If the selection cannot be empty , DateTime.Today is set as the selection
+        /// </summary>
+        public void Clear()
+        {
+            if (mData.Count == 0)
+                return;
+            if (mAllowEmpty == false && IsSingleDateSelected(DateTime.Today))
+                return;
+            mData.Clear();
+            ValidateNonEmpty();
+            Invalidate();
+        }
+
+        /// <summary>
+        /// appends all the items to the date collection
+        /// </summary>
+        /// <param name="range"></param>
+        public void AddItems(HashSet<DateTime> range)
+        {
+            bool changed = false;
+            foreach(DateTime d in range)
+            {
+                if (mData.Add(d))
+                    changed = true;
+            }
+            if (changed)
+                Invalidate();
+        }
+
+        /// <summary>
+        /// adds a date into the date selection. 
+        /// </summary>
+        /// <param name="date"></param>
+        public void Add(DateTime date)
+        {
+            if(mData.Add(date.Date))
+                Invalidate();
+        }
+
+        /// <summary>
+        /// returns true if the date collection contains the specified date
+        /// </summary>
+        /// <param name="date"></param>
+        /// <returns></returns>
+        public bool Contains(DateTime date)
+        {
+            return mData.Contains(date.Date);
+        }
+
+        /// <summary>
+        /// gets the date item at index 
+        /// </summary>
+        /// <param name="index"></param>
+        /// <returns></returns>
+        public DateTime GetItem(int index)
+        {
+            if(mInvalid || mItems == null)
+            {
+                mInvalid = false;
+                mItems = mData.OrderBy(x => x).ToArray();
+            }
+            return mItems[index];
+        }
+
+        /// <summary>
+        /// removes a date from the collection if it present. returns true if the date was present and was removed
+        /// </summary>
+        /// <param name="date"></param>
+        /// <returns></returns>
+        public bool Remove(DateTime date)
+        {
+
+            if (mData.Remove(date.Date))
+            {
+                ValidateNonEmpty();
+                Invalidate();
+                return true;
+            }
+            return false;
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5ffa37277c4fcc84898295747af4801a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 464 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs

@@ -0,0 +1,464 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+using UnityEngine.Events;
+using UnityEngine.Serialization;
+using UnityEngine.UI;
+
+namespace Bitsplash.DatePicker
+{
+    [ExecuteInEditMode]
+    public partial class DatePickerContent : MonoBehaviour , IDatePickerSettingsItem
+    {
+        [SerializeField]
+        [HideInInspector]
+        private bool isOpen;
+
+        const int RowCount = 6;
+        const int ColumnCount = 7;
+
+        [FormerlySerializedAs("FirstDayOfWeek")]
+        [SerializeField]
+        [Tooltip("the first day of the week for the content")]
+        private DayOfWeek firstDayOfWeek = DayOfWeek.Sunday;
+
+        [FormerlySerializedAs("RightToLeft")]
+        [SerializeField]
+        private bool rightToLeft = false;
+
+        [FormerlySerializedAs("BottomToTop")]
+        [SerializeField]
+        private bool bottomToTop = false;
+
+        [FormerlySerializedAs("CellPrefab")]
+        [SerializeField]
+        [Tooltip("drag a cell template here to use it with the datepicker")]
+        private DatePickerCell cellPrefab = null;
+
+        [FormerlySerializedAs("SelectionMode")]
+        [SerializeField]
+        [Tooltip("single,range and multiple selection types. ")]
+        private SelectionType selectionMode;
+
+        [FormerlySerializedAs("AllowEmptySelection")]
+        [SerializeField]
+        private bool allowEmptySelection = false;
+
+        [SerializeField]
+        private DateTime startDate = new DateTime(1960,1,1);
+
+        [SerializeField]
+        private DateTime endDate = new DateTime(2030, 12, 31);
+
+        void ValidateYear()
+        {
+            if (endDate < startDate)
+                endDate = startDate;
+            mMonthFirst = new DateTime(mMonthFirst.Year, mMonthFirst.Month, 1);
+            if(mMonthFirst > endDate)
+            {
+                mMonthFirst = new DateTime(endDate.Year, endDate.Month, 1);
+            }
+            if(mMonthFirst < startDate)
+            {
+                mMonthFirst = new DateTime(startDate.Year, startDate.Month, 1);
+            }
+        }
+        public DateTime StartDate
+        {
+            get { return startDate; }
+            set
+            {
+                startDate = value.Date;
+                ValidateYear();
+                Invalidate();
+                OnSettingsChanged();
+            }
+        }
+
+        public DateTime EndDate
+        {
+            get { return endDate; }
+            set
+            {
+                endDate = value.Date;
+                ValidateYear();
+                Invalidate();
+                OnSettingsChanged();
+            }
+        }
+
+        /// <summary>
+        /// the first day of the week for the date picker
+        /// </summary>
+        public DayOfWeek FirstDayOfWeek
+        {
+            get { return firstDayOfWeek; }
+            set
+            {
+                firstDayOfWeek = value;
+                OnSettingsChanged();
+            }
+        }
+
+        /// <summary>
+        /// set the date picker to right to left mode
+        /// </summary>
+        public bool RightToLeft
+        {
+            get { return rightToLeft; }
+            set
+            {
+                rightToLeft = value;
+                OnSettingsChanged();
+            }
+        }
+
+
+        /// <summary>
+        /// show days from bottom to top instead of top to bottom
+        /// </summary>
+        public bool BottomToTop
+        {
+            get { return bottomToTop; }
+            set
+            {
+                bottomToTop = value;
+                OnSettingsChanged();
+            }
+        }
+
+
+        //public DatePickerCell CellPrefab
+        //{
+        //    get { return cellPrefab; }
+        //    set
+        //    {
+        //        cellPrefab = value;
+        //    }
+        //}
+
+
+            /// <summary>
+            /// set the selection mode for the date picker. Single ,Range or Multiple
+            /// </summary>
+        public SelectionType SelectionMode
+        {
+            get { return selectionMode; }
+            set
+            {
+                selectionMode = value;
+                OnSettingsChanged();
+            }
+        }
+
+
+        /// <summary>
+        /// allows selection of the date picker to be empty
+        /// </summary>
+        public bool AllowEmptySelection
+        {
+            get { return allowEmptySelection; }
+            set
+            {
+                allowEmptySelection = value;
+                OnSettingsChanged();
+            }
+        }
+
+
+        /// <summary>
+        /// used for internal purpose
+        /// </summary>
+        public event Action SettingsChanged;
+        /// <summary>
+        /// currently the displayed month and year
+        /// </summary>
+        DateTime mMonthFirst = DateTime.Today;
+        /// <summary>
+        /// genearted cells
+        /// </summary>
+        DatePickerCell[] mCells;
+        /// <summary>
+        /// the selection collection object for the content
+        /// </summary>
+        DatePickerCollection mSelection = new DatePickerCollection();
+        /// <summary>
+        /// a date to cell map for quick lookup
+        /// </summary>
+        Dictionary<DateTime, DatePickerCell> mDateToCell = new Dictionary<DateTime, DatePickerCell>();
+
+        /// <summary>
+        /// an input delegation for the date picker
+        /// </summary>
+        DatePickerInput mDatePickerInput;
+
+        /// <summary>
+        /// true if the datepicker should be recreated
+        /// </summary>
+        bool mInvalidated = true;
+
+        /// <summary>
+        /// This event triggers when the use navigates the datepicker
+        /// </summary>
+        public UnityEvent OnDisplayChanged;
+        /// <summary>
+        /// this event triggers when the date selection has changed
+        /// </summary>
+        public UnityEvent OnSelectionChanged;
+
+        /// <summary>
+        /// the date picker selection collection. Use this object to change and query the current date selection
+        /// </summary>
+        public DatePickerCollection Selection { get { return mSelection; } }
+
+        void EnsureInput()
+        {
+            mDatePickerInput = GetComponent<DatePickerInput>();
+            if (mDatePickerInput == null)
+                mDatePickerInput = gameObject.AddComponent<DatePickerStandardInput>();
+        }
+
+        /// <summary>
+        /// the currently displayed date in the datepicker
+        /// </summary>
+        public DateTime DisplayDate { get { return mMonthFirst; } }
+
+        /// <summary>
+        /// sets the month and year being displayed in the date picker. 
+        /// </summary>
+        /// <param name="year"></param>
+        /// <param name="month"></param>
+        public void SetMonthAndYear(int year,int month)
+        {
+            FillCells(new DateTime(year, month, 1));
+        }
+        /// <summary>
+        /// sets the year being displayed in the date picker
+        /// </summary>
+        /// <param name="year"></param>
+        public void SetYear(int year)
+        {
+            FillCells(new DateTime(year, mMonthFirst.Month, 1));
+        }
+        /// <summary>
+        /// sets the month being displayed in the date picker
+        /// </summary>
+        /// <param name="month"></param>
+        public void SetMonth(int month)
+        {
+            FillCells(new DateTime(mMonthFirst.Year,month, 1));
+        }
+        /// <summary>
+        /// used internally
+        /// </summary>
+        public string EditorTitle { get {return "Board"; } }
+
+        /// <summary>
+        /// used internally
+        /// </summary>
+        public int Order { get { return 0; } }
+
+        /// <summary>
+        /// advances the display by 1 year
+        /// </summary>
+        public void NextYear()
+        {
+            FillCells(mMonthFirst.AddYears(1));
+        }
+        void OnSettingsChanged()
+        {
+            if (SettingsChanged != null)
+                SettingsChanged();
+        }
+        /// <summary>
+        /// retracts the display by 1 year
+        /// </summary>
+        public void PrevYear()
+        {
+            FillCells(mMonthFirst.AddYears(-1));
+        }
+        /// <summary>
+        /// advances the display by 1 month
+        /// </summary>
+        public void NextMonth()
+        {
+            FillCells(mMonthFirst.AddMonths(1));
+        }
+        /// <summary>
+        /// retracts the display by 1 month
+        /// </summary>
+        public void PrevMonth()
+        {
+            FillCells(mMonthFirst.AddMonths(-1));
+        }
+
+        public virtual string DateToString(DateTime date)
+        {
+            return date.Day.ToString();
+        }
+        void GenerateCells()
+        {
+            Clear();
+            if (cellPrefab == null)
+                return;
+
+            mCells = new DatePickerCell[((int)RowCount) * ((int)ColumnCount)];
+
+            float ColumnSize = 1f / ColumnCount;
+            float RowSize = 1f / RowCount;
+
+            for(float i=0; i<RowCount; i++)
+            {
+                float startY = i / RowCount;
+                if (BottomToTop == false)
+                    startY = 1f - startY - RowSize;
+                float endY = startY + RowSize;
+                for (float j=0; j<ColumnCount; j++)
+                {
+                    float startX = j / ColumnCount;
+                    if (RightToLeft)
+                        startX = 1f - startX - ColumnSize;
+                    float endX = startX + ColumnSize;
+
+                    GameObject newObj = GameObject.Instantiate(cellPrefab.gameObject, transform);
+                    CommonMethods.SafeDestroy(newObj.GetComponent<DatePickerCellTemplate>());
+                    CommonMethods.HideObject(newObj);
+                    newObj.name = String.Format("day_{0}_{1}", j, i);
+                    newObj.SetActive(true);
+                    CommonMethods.EnsureComponent<IDateTimeItem>(newObj);
+                    var rect = newObj.GetComponent<RectTransform>();
+                    rect.anchorMin = new Vector2(startX, startY);
+                    rect.anchorMax = new Vector2(endX, endY);
+                    rect.anchoredPosition = new Vector2(0f, 0f);
+                    rect.sizeDelta = new Vector2(0f, 0f);
+                    int childIndex = (int)(i * ColumnCount + j);
+                    childIndex = (int)(i * ColumnCount + j);
+                    mCells[childIndex] = newObj.GetComponent<DatePickerCell>();
+                    var addon = CommonMethods.EnsureComponent<CellAddon>(newObj);
+                    addon.SetParent(this, childIndex);
+
+                }
+            }
+
+            FillCells(mMonthFirst);
+        }
+        DateTime MonthFromDate(DateTime date)
+        {
+            return new DateTime(date.Year, date.Month, 1);
+        }
+        DatePickerCell getCell(int day,int week)
+        {
+            return mCells[week * ColumnCount + day];
+        }
+        
+        void FillCells(DateTime monthFirst)
+        {
+            monthFirst = monthFirst.Date;
+            mMonthFirst = monthFirst;
+            ValidateYear();
+            if (mCells == null)
+                return;
+
+            monthFirst = mMonthFirst;
+            int monthDayOfWeek = (int)monthFirst.DayOfWeek;
+            int span = monthDayOfWeek - (int)FirstDayOfWeek;
+            if (span < 0)
+                span += 7;
+
+            DateTime startFrom = (monthFirst - TimeSpan.FromDays(span)).Date;
+            DateTime endIn = startFrom + TimeSpan.FromDays(RowCount * ColumnCount);
+            DateTime monthLast = monthFirst + TimeSpan.FromDays(DateTime.DaysInMonth(monthFirst.Year, monthFirst.Month) - 1);
+            DateTime current = startFrom;
+            mDateToCell.Clear();
+            for (int i=0; i<mCells.Length; i++)
+            {
+                mCells[i].DayValue = current;
+                mCells[i].SetText(DateToString(current));
+                bool cellenabled = true;
+                if (current < monthFirst || current > monthLast || current < startDate || current > endDate)
+                    cellenabled = false;
+                mCells[i].SetInitialSettings(cellenabled, false);
+                mDateToCell[current.Date] = mCells[i];
+                current += TimeSpan.FromDays(1);
+            }
+            RefreshSelection();
+            if (OnDisplayChanged != null)
+                OnDisplayChanged.Invoke();
+        }
+
+        protected void Clear()
+        {
+            IDateTimeItem[] children = GetComponentsInChildren<IDateTimeItem>();
+            for (int i = 0; i < children.Length; ++i)
+            {
+                if (children[i] != null)
+                {
+                    if (children[i].gameObject.GetComponentInParent<DatePickerContent>() != this)
+                        continue;
+                    if (children[i].gameObject != gameObject)
+                        CommonMethods.SafeDestroy(children[i].gameObject);
+                }
+            }
+        }
+
+        public void Invalidate()
+        {
+            mInvalidated = true;
+        }
+        void HookEvents()
+        {
+            ((IDatePickerCollectionPrivate)mSelection).SelectionModified -= DatePicker_SelectionModified;
+            ((IDatePickerCollectionPrivate)mSelection).SelectionModified += DatePicker_SelectionModified;
+        }
+
+        private void DatePicker_SelectionModified()
+        {
+            RaiseSelectionChanged();
+        }
+
+        public void Start()
+        {
+            HookEvents();
+            EnsureInput();
+            GenerateCells();
+          //  if (AllowEmptySelection == false)
+          //      SelectOne(DateTime.Today);
+        }
+
+        public void Update()
+        {
+            if(AllowEmptySelection != ((IDatePickerCollectionPrivate)mSelection).AllowEmpty)
+                ((IDatePickerCollectionPrivate)mSelection).AllowEmpty = AllowEmptySelection;
+            UpdateSelection();
+            if(mInvalidated)
+            {
+                GenerateCells();
+                mInvalidated = false;
+            }
+        }
+
+        public void OnValidate()
+        {
+            ValidateYear();
+            OnSettingsChanged();
+            Invalidate();
+        }
+
+        /// <summary>
+        /// retrives the underlaying gameobject specified by dateTime. If the dateTime is not currently displayed , null is returned
+        /// </summary>
+        /// <param name="dateTime"></param>
+        /// <returns></returns>
+        public DatePickerCell GetCellObjectByDate(DateTime dateTime)
+        {
+            DatePickerCell res = null;
+            if (mDateToCell.TryGetValue(dateTime.Date, out res))
+                return res;
+            return null;
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bce6f4381e832d24583a1b0c14c9e752
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 15 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    interface IDatePickerCollectionPrivate
+    {
+        bool Changed { get; set; }
+        bool AllowEmpty { get; set; }
+        event Action SelectionModified;
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 229d73d069ddf9b4d9736254e8837601
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 20 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    public class DatePickerBackgroundSetting : MonoBehaviour, IDatePickerSettingsItem
+    {
+        [SerializeField]
+        [HideInInspector]
+        private bool isOpen;
+
+        public string EditorTitle { get { return gameObject.name; } }
+
+        public int Order { get { return 1; } }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 898e866135fe96b45a03ddabbde1a61f
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 20 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    [RequireComponent(typeof(RectTransform))]
+    public abstract class DatePickerCell : MonoBehaviour
+    {
+        public abstract Color MarkerColor { get; set; }
+        public abstract bool CellSelected { get; set; }
+        public abstract bool CellEnabled { get; set; }
+        public abstract DateTime DayValue { get; set; }
+        public abstract void SetText(string text);
+        public abstract void SetInitialSettings(bool enabled, bool selected);
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5131c682cad278d46b142466fb127d5e
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 20 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    public class DatePickerCellTemplate : MonoBehaviour, IDatePickerSettingsItem
+    {
+        [SerializeField]
+        [HideInInspector]
+        private bool isOpen;
+
+        public string EditorTitle { get { return gameObject.name; } }
+
+        public int Order { get { return 2; } }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 746317b581967e24a9b69effdf5b1106
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 66 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs

@@ -0,0 +1,66 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    /// <summary>
+    /// base class for date picker elements. They included buttons and texts
+    /// </summary>
+    public abstract class DatePickerElement : MonoBehaviour
+    {
+
+        [SerializeField]
+        [HideInInspector]
+        private bool isOpen;
+
+        protected virtual void Start()
+        {
+            SetLinkedElements();
+        }
+
+        /// <summary>
+        /// notifys the date picker element of the DatePickerSettings and DatePickerContent objects that govern it. 
+        /// these objects are used to query and modify the date picker
+        /// </summary>
+        void SetLinkedElements()
+        {
+            var main = GetComponentInParent<DatePickerSettings>();
+            if (main == null)
+                Debug.LogError("Date Picker elements must have a parent GameObject with the behviour DatePickerSettings");
+            else
+            {
+                var content = main.Content;
+                if (content != null)
+                {
+                    SetMain(main);
+                    SetContent(content);
+                    content.SettingsChanged -= OnSettingsChanged;
+                    content.SettingsChanged += OnSettingsChanged;
+                }
+            }
+        }
+
+        protected virtual void OnSettingsChanged()
+        {
+
+        }
+
+        public virtual void OnValidate()
+        {
+            if(isActiveAndEnabled)
+                SetLinkedElements();
+        }
+
+        /// <summary>
+        /// sets the main DatePickerSettings object assicuated with this script
+        /// </summary>
+        /// <param name="main"></param>
+        protected abstract void SetMain(DatePickerSettings main);
+        /// <summary>
+        /// sets the main DatePickerContent object assicuated with this script
+        /// </summary>
+        /// <param name="content"></param>
+        protected abstract void SetContent(DatePickerContent content);
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 913e98d0ced5ea44e8d1f7b4af557965
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 14 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    public abstract class DatePickerInput : MonoBehaviour
+    {
+        public abstract MultipleSelectionInputValue MultipleSelectionValue { get; }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 142eee2af40bc2543abe91bc216a3278
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 14 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    public abstract class DatePickerLabel : MonoBehaviour
+    {
+        public abstract void SetText(string text);
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f4f4126f9c9f47645840eab33f9a5e50
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 67 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs

@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+
+    public partial class DatePickerSettings : MonoBehaviour
+    {
+        [SerializeField]
+        private Font textFont;
+
+        /// <summary>
+        /// the text font used for UI.Text 
+        /// </summary>
+        public Font TextFont
+        {
+            get { return textFont; }
+            set
+            {
+                textFont = value;
+                if (TextTypeChanged != null)
+                    TextTypeChanged();
+            }
+        }
+
+        public event Action TextTypeChanged;
+        DatePickerContent mContent = null;
+
+        /// <summary>
+        /// the datepicker content object for this date picker. 
+        /// </summary>
+        public DatePickerContent Content
+        {
+            get
+            {
+                if (mContent == null)
+                {
+                    var contents = GetComponentsInChildren<DatePickerContent>();
+                    if (contents.Length == 0)
+                        Debug.LogError("A DatePickerSettings behaviour must parent a DatePickerContent behaviour in a child GameObject");
+                    else
+                        if (contents.Length > 1)
+                        Debug.LogError("A DatePickerSettings behaviout may only have one child DatePickerContent behaviour ");
+                    else
+                        mContent = contents[0];
+                }
+                return mContent;
+            }
+        }
+        private void Start()
+        {
+
+        }
+
+        private void OnValidate()
+        {
+            foreach (var elem in GetComponentsInChildren<DatePickerElement>())
+            {
+                elem.OnValidate();
+            }
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c0fe3789ee2a1824eab74683544502a9
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 24 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    public class DatePickerStandardInput : DatePickerInput
+    {
+        public override MultipleSelectionInputValue MultipleSelectionValue
+        {
+            get
+            {
+                if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl) || Input.GetKey(KeyCode.RightCommand) || Input.GetKey(KeyCode.LeftCommand))
+                    return MultipleSelectionInputValue.Append;
+                if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
+                    return MultipleSelectionInputValue.Append;
+                return MultipleSelectionInputValue.Singular;
+            }
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5b41254ad534f5f4dbe3c4807a84449f
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 126 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs

@@ -0,0 +1,126 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    /// <summary>
+    /// shows the week day names on top the date picker
+    /// </summary>
+    [ExecuteInEditMode]
+    public class DayTitle : DatePickerElement , IDatePickerSettingsItem
+    {
+        public string EditorTitle { get { return "Day Title"; } }
+
+        public DatePickerCell CellPrefab;
+        public string Format = "ddd";
+        DatePickerContent mContent;
+        bool mInvalid = true;
+
+        public int Order { get { return 8; } }
+
+        void GenerateCells()
+        {
+            Clear();
+            if (CellPrefab == null || mContent == null)
+                return;
+
+            float ColumnSize = 1f / 7f;
+            DateTime baseDate = DateTime.Today.Date;
+            int monthDayOfWeek = (int)baseDate.DayOfWeek;
+            int span = monthDayOfWeek - (int)mContent.FirstDayOfWeek;
+            if (span < 0)
+                span += 7;
+            DateTime startFrom = (baseDate - TimeSpan.FromDays(span)).Date;
+            for (int i = 0; i < 7; i++)
+            {
+                DateTimeFormatInfo dtfi = new CultureInfo("zh-CN", false).DateTimeFormat;
+
+                DateTime current = startFrom.Add(TimeSpan.FromDays(i)).Date;
+                float startX = ((float)i) / 7f;
+                if (mContent.RightToLeft)
+                    startX = 1f - startX - ColumnSize;
+                float endX = startX + ColumnSize;
+
+                GameObject newObj = GameObject.Instantiate(CellPrefab.gameObject, transform);
+                CommonMethods.SafeDestroy(newObj.GetComponent<DatePickerCellTemplate>());
+                CommonMethods.HideObject(newObj);
+                newObj.name = String.Format("day_{0}", i);
+                newObj.SetActive(true);
+                CommonMethods.EnsureComponent<IDateTimeItem>(newObj);
+                var rect = newObj.GetComponent<RectTransform>();
+                rect.anchorMin = new Vector2(startX, 0f);
+                rect.anchorMax = new Vector2(endX, 1f);
+                rect.anchoredPosition = new Vector2(0f, 0f);
+                rect.sizeDelta = new Vector2(0f, 0f);
+                var cell = newObj.GetComponent<DatePickerCell>();
+                cell.SetInitialSettings(true, false);
+                cell.DayValue = current;
+                try
+                {
+                    cell.SetText(current.ToString(Format,dtfi));
+                }
+                catch(Exception)
+                {
+                    Debug.LogWarning("invalid format in day title");
+                }                 
+            }
+        }
+        public void Clear()
+        {
+            IDateTimeItem[] children = GetComponentsInChildren<IDateTimeItem>();
+            for (int i = 0; i < children.Length; ++i)
+            {
+                if (children[i] != null)
+                {
+                    if (children[i].gameObject.GetComponentInParent<DayTitle>() != this)
+                        continue;
+                    if (children[i].gameObject != gameObject)
+                        CommonMethods.SafeDestroy(children[i].gameObject);
+                }
+            }
+        }
+        public void Invalidate()
+        {
+            mInvalid = true;
+        }
+        public override void OnValidate()
+        {
+            base.OnValidate();
+            Invalidate();
+        }
+        // Start is called before the first frame update
+        protected override void Start()
+        {
+            base.Start();
+            Invalidate();
+        }
+        protected override void OnSettingsChanged()
+        {
+            base.OnSettingsChanged();
+            Invalidate();
+        }
+        // Update is called once per frame
+        void Update()
+        {
+            if(mInvalid == true)
+            {
+                mInvalid = false;
+                GenerateCells();
+            }
+        }
+
+        protected override void SetContent(DatePickerContent content)
+        {
+            mContent = content;
+            Invalidate();
+        }
+
+        protected override void SetMain(DatePickerSettings main)
+        {
+
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5cde14b682a49eb4fa7cdce34de69813
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: eb00ea298ab962c40a0f91bb43ec1297
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 23 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine.UI;
+
+namespace Bitsplash.DatePicker
+{
+    /// <summary>
+    /// this is a UI.Text implementation of the drop down
+    /// </summary>
+    public class DatePickerDropDown : DatePickerDropDownBase
+    {
+        public Text Label;
+
+        protected override void SetText(string text)
+        {
+            if (Label != null)
+                Label.text = text;
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 137f420b74ffe624ba4e39c0746e5cd4
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 159 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDownBase.cs

@@ -0,0 +1,159 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Events;
+using UnityEngine.UI;
+
+namespace Bitsplash.DatePicker
+{
+    public abstract class DatePickerDropDownBase : MonoBehaviour
+    {
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public string NoSelectionPrompt = "Select a date...";
+        /// <summary>
+        /// the date format of the label
+        /// </summary>
+        public string labelDateFormat = "d";
+        /// <summary>
+        /// the date picker settings object for the drop down
+        /// </summary>
+        public DatePickerSettings DropDownContent;
+        /// <summary>
+        /// the drop down button
+        /// </summary>
+        public Button DropDownButton;
+
+        GameObject mBlocker;
+        // Start is called before the first frame update
+        void Start()
+        {
+            InitDropDown();
+        }
+
+        /// <summary>
+        /// initializes the drop down events
+        /// </summary>
+        void InitDropDown()
+        {
+            if(DropDownButton == null)
+                Debug.LogWarning("Drop Down Button Not Assigned"); // show warninig
+            else
+                DropDownButton.onClick.AddListener(ButtonClicked); // listen to drop down button clicks
+            if (DropDownContent == null)
+                Debug.LogWarning("Drop Down Content Not Assigned");// show warninig
+            else
+            {
+                // set the selection mode to single.
+                DropDownContent.Content.SelectionMode = SelectionType.Single;
+                // listen to selection changed events on the date picker
+                DropDownContent.Content.OnSelectionChanged.AddListener(SelectionChanged);
+                // disable the drop down object
+                DropDownContent.gameObject.SetActive(false);
+                Canvas canvas = CommonMethods.EnsureComponent<Canvas>(DropDownContent.gameObject);
+                CommonMethods.EnsureComponent<GraphicRaycaster>(DropDownContent.gameObject);
+
+                
+            }
+        }
+
+        protected abstract void SetText(string text);
+        
+        /// <summary>
+        /// shows the drop down
+        /// </summary>
+        void Show()
+        {
+            var canvas = DropDownContent.GetComponent<Canvas>();
+            if (canvas == null)
+                return;
+            DropDownContent.gameObject.SetActive(true);
+            canvas.overrideSorting = true;
+            canvas.sortingOrder = 30000;
+            mBlocker = CreateBlocker();   
+        }
+        /// <summary>
+        /// returnes the selected date from the drop down , or null if non is selected
+        /// </summary>
+        /// <returns></returns>
+        public System.DateTime? GetSelectedDate()
+        {
+            if (DropDownContent == null)
+                return null;
+            if (DropDownContent.Content.Selection.Count != 1)
+                return null;
+            return DropDownContent.Content.Selection.GetItem(0);
+        }
+        //hides the drop down
+        void Hide()
+        {
+            DropDownContent.gameObject.SetActive(false);
+            CommonMethods.SafeDestroy(mBlocker);
+        }
+        /// <summary>
+        /// called when the date picker selection has changed
+        /// </summary>
+        void SelectionChanged()
+        {
+            var d = GetSelectedDate(); // get the selected date
+            string t = NoSelectionPrompt;
+            try
+            {
+                if (d.HasValue)
+                    t = d.Value.ToString(labelDateFormat); // find the correct string to show for the selected date
+            }
+            catch(Exception)
+            {
+                Debug.LogWarning("the format specified for the drop down is not valid");
+            }
+            SetText(t); // show the selected date
+            Hide();
+        }
+
+        protected virtual GameObject CreateBlocker()
+        {
+            var canvasItems = GetComponentsInParent<Canvas>();
+            if (canvasItems.Length == 0)
+                return null;
+
+            Canvas rootCanvas = canvasItems[0];
+            GameObject gameObject = new GameObject("Blocker");
+            RectTransform rectTransform = gameObject.AddComponent<RectTransform>();
+            rectTransform.SetParent(rootCanvas.transform, false);
+            rectTransform.anchorMin = (Vector2)Vector3.zero;
+            rectTransform.anchorMax = (Vector2)Vector3.one;
+            rectTransform.sizeDelta = Vector2.zero;
+            Canvas canvas = gameObject.AddComponent<Canvas>();
+            canvas.overrideSorting = true;
+            Canvas component = DropDownContent.GetComponent<Canvas>();
+            canvas.sortingLayerID = component.sortingLayerID;
+            canvas.sortingOrder = component.sortingOrder - 1;
+            gameObject.AddComponent<GraphicRaycaster>();
+            gameObject.AddComponent<Image>().color = Color.clear;
+            gameObject.AddComponent<Button>().onClick.AddListener(new UnityAction(this.Hide));
+            return gameObject;
+        }
+
+        /// <summary>
+        /// handle the drop down button click
+        /// </summary>
+        void ButtonClicked()
+        {
+            if (DropDownContent != null)
+            {
+                if (DropDownContent.gameObject.activeSelf)
+                    Hide();
+                else
+                    Show();
+            }
+        }
+        // Update is called once per frame
+        void Update()
+        {
+
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDownBase.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b9db1035c44143c4fba0c43a46855e6d
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Editor.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5716532daf1a51c4f81a222c14307b60
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 151 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Editor/DatePickerSettingsEditor.cs

@@ -0,0 +1,151 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEditor;
+using UnityEngine;
+using System.Linq;
+using UnityEngine.UI;
+
+namespace Bitsplash.DatePicker.Editors
+{
+    [CustomEditor(typeof(DatePickerSettings))]
+    public class DatePickerSettingsEditor : Editor
+    {
+        void DoButton(SerializedObject serialized)
+        {
+            var im = serialized.FindProperty("TargetImage");
+            if (im.objectReferenceValue != null)
+            {
+                var serilizedIm = new SerializedObject(im.objectReferenceValue);
+                EditorGUILayout.LabelField("Button Image", EditorStyles.boldLabel);
+                var imSprite = serilizedIm.FindProperty("m_Sprite");
+                EditorGUILayout.PropertyField(imSprite);
+                var imColor = serilizedIm.FindProperty("m_Color");
+                EditorGUILayout.PropertyField(imColor);
+                serilizedIm.ApplyModifiedProperties();
+            }
+            var tx = serialized.FindProperty("TargetText");
+            if (tx.objectReferenceValue != null)
+            {
+                EditorGUILayout.LabelField("Button Text", EditorStyles.boldLabel);
+                var serilizedTx = new SerializedObject(tx.objectReferenceValue);
+                var itTx = serilizedTx.GetIterator();
+                bool flagTx = true;
+                while (itTx.NextVisible(flagTx))
+                {
+                    flagTx = false;
+                    if (itTx.name.ToLower() == "m_script")
+                        continue;
+                    EditorGUILayout.PropertyField(itTx, includeChildren: true);
+                }
+                serilizedTx.ApplyModifiedProperties();
+            }
+        }
+        void DoBackgroundSetting(UnityEngine.Object obj)
+        {
+            var mono = (obj as MonoBehaviour);
+            if (mono == null)
+                return;
+            var image = mono.GetComponent<Image>();
+            if (image == null)
+                return;
+            var serilizedIm = new SerializedObject(image);
+            var imSprite = serilizedIm.FindProperty("m_Sprite");
+            EditorGUILayout.PropertyField(imSprite);
+            var imColor = serilizedIm.FindProperty("m_Color");
+            EditorGUILayout.PropertyField(imColor);
+            serilizedIm.ApplyModifiedProperties();
+
+        }
+        void DoCellTemplate(UnityEngine.Object obj)
+        {
+            var mono = (obj as MonoBehaviour);
+            if (mono == null)
+                return;
+            var cell = mono.GetComponent<StandardDatePickerCell>();
+            if (cell == null)
+                return; 
+            var serialized = new SerializedObject(cell);
+
+            var it = serialized.GetIterator();
+            bool flag = true;
+            while (it.NextVisible(flag))
+            {
+                flag = false;
+                if (it.name.ToLower() == "m_script")
+                    continue;
+                if (it.name.ToLower() == "textitem")
+                    continue;
+                if (it.name.ToLower() == "mark")
+                    continue;
+                if (it.name.ToLower() == "background")
+                    continue;
+                EditorGUILayout.PropertyField(it, includeChildren: true);
+            }
+
+            serialized.ApplyModifiedProperties();
+        }
+        public override void OnInspectorGUI()
+        {
+            base.OnInspectorGUI();
+            var picker = target as DatePickerSettings;
+            foreach(var item in picker.GetComponentsInChildren<IDatePickerSettingsItem>(true).OrderBy(x=> x.Order))
+            {
+                var obj = (UnityEngine.Object)item;
+                var serialized = new SerializedObject(obj);
+                var openProp = serialized.FindProperty("isOpen");
+                if (openProp == null)
+                    continue;
+                openProp.boolValue = EditorGUILayout.Foldout(openProp.boolValue, item.EditorTitle);
+                if (openProp.boolValue)
+                {
+                    EditorGUI.indentLevel++;
+                    if(item is DatePickerBackgroundSetting)
+                    {
+                        DoBackgroundSetting(obj);
+                    }
+                    if (item is DatePickerCellTemplate)
+                    {
+                        DoCellTemplate(obj);
+                    }
+                    else if (item is DatePickerButton)
+                    {
+                        DoButton(serialized);
+                    }
+                    else
+                    {
+                        var it = serialized.GetIterator();
+                        bool flag = true;
+                        while (it.NextVisible(flag))
+                        {
+                            flag = false;
+                            if (it.name.ToLower() == "m_script")
+                                continue;
+                            if (it.name.ToLower() == "m_material")
+                                continue;
+                            if (it.name.ToLower() == "m_raycasttarget")
+                                continue;
+                            if (it.name.ToLower() == "cellprefab")
+                                continue;
+                            if (it.name.ToLower() == "totalrows")
+                                continue;
+                            if (it.name.ToLower() == "totalcolumns")
+                                continue;
+                            if (it.name.ToLower() == "texturetile")
+                                continue;
+                            if (it.name.ToLower() == "m_oncullstatechanged")
+                                continue;
+                            if (it.name.ToLower() == "targettext")
+                                continue;
+                            if (it.name.ToLower() == "targetimage")
+                                continue;
+
+                            EditorGUILayout.PropertyField(it, includeChildren: true);
+                        }
+                    }
+                    EditorGUI.indentLevel--;
+                }
+                serialized.ApplyModifiedProperties();
+            }
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Editor/DatePickerSettingsEditor.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 89764379a6026914da49676446dd3eeb
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7720fc210d505eb4fa356a1d576e169c
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 45 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerButton.cs

@@ -0,0 +1,45 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.UI;
+
+namespace Bitsplash.DatePicker
+{
+    [ExecuteInEditMode]
+    public abstract class DatePickerButton : DatePickerElement
+    {
+        Button mButton;
+        public Image TargetImage;
+        public DatePickerText TargetText;
+
+        protected DatePickerContent Content { get; private set; } 
+
+        public abstract void RaiseClicked();
+
+        protected override void SetContent(DatePickerContent content)
+        {
+            Content = content;
+        }
+
+        protected override void SetMain(DatePickerSettings main)
+        {
+
+        }
+        
+        // Start is called before the first frame update
+        protected override void Start()
+        {
+            base.Start();
+            mButton = GetComponent<Button>();
+            if (mButton != null)
+                mButton.onClick.AddListener(RaiseClicked);
+        }
+
+        void OnDestroy()
+        {
+            if(mButton != null)
+                mButton.onClick.RemoveListener(RaiseClicked);
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerButton.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1dfa7e8dca76b844292af7378b9c5b1b
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 220 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerText.cs

@@ -0,0 +1,220 @@
+using Bitsplash.DatePicker;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Bitsplash.DatePicker
+{
+    [ExecuteInEditMode]
+    public partial class DatePickerText : DatePickerElement
+    {
+
+        //[SerializeField]
+        private RectTransform contentGameObject = null;
+
+ //       [HideInInspector]
+        [SerializeField]
+        private string text;
+
+        [SerializeField]
+        private Color color = Color.white;
+
+        [SerializeField]
+        private int textSize = 14;
+
+        [SerializeField]
+        private FontStyle fontStyle = FontStyle.Normal;
+
+        [SerializeField]
+        private TextAnchor alignment = TextAnchor.MiddleLeft;
+ 
+        protected DatePickerContent Content { get; set; }
+        bool mValidate = false;
+        public RectTransform ContentGameObject
+        {
+            get { return contentGameObject; }
+            set
+            {
+                contentGameObject = value;
+                RecreateTextObject();
+            }
+        }
+        public string Text
+        {
+            get { return text; }
+            set { SetText(value); }
+        }
+        public FontStyle FontStyle
+        {
+            get { return fontStyle; }
+            set
+            {
+                SetStyle(value);
+            }
+        }
+        public Color Color
+        {
+            get { return color; }
+            set { SetColor(value); }
+        }
+
+        public TextAnchor Alignment
+        {
+            get { return alignment; }
+            set
+            {
+                SetAlignment(value);
+            }
+        }
+        public int TextSize
+        {
+            get { return textSize; }
+            set
+            {
+                SetTextSize(value);
+            }
+        }
+
+        DatePickerSettings mMain;
+
+        [HideInInspector]
+        [SerializeField]
+        UnityEngine.Object mTextObject;
+
+        protected override void SetContent(DatePickerContent content)
+        {
+            Content = content;
+        }
+
+        protected override void SetMain(DatePickerSettings main)
+        {
+            mMain = main;
+            InnerSetMain();
+            if(mTextObject == null)
+                RecreateTextObject();
+        }
+
+        void OnEnable()
+        {
+            if(mTextObject == null)
+                RecreateTextObject(true);
+        }
+
+        void RecreateTextObject(bool overrideCheck = false)
+        {
+            if(overrideCheck || isActiveAndEnabled)
+                StartCoroutine(RecreateTextObjectCorout());
+        }
+        partial void DestroyTextMesh();
+        IEnumerator RecreateTextObjectCorout()
+        {
+            bool res = false;
+            CheckTextMesh(ref res);
+            if(mValidate)
+                yield return 0;
+            if (mTextObject != null || GetComponent<Text>() != null || res == true)
+            {
+                CommonMethods.SafeDestroy(mTextObject);
+                CommonMethods.SafeDestroy(GetComponent<Text>());
+                DestroyTextMesh();
+                mTextObject = null;
+                yield return 0;
+            }
+            VerifyTextObject();
+        }
+        void VerifyTextObject()
+        {
+            if (mMain == null)
+                return;
+            InnerVerifyTextObject();
+            if(mTextObject == null)
+            {
+                var obj = gameObject;
+                if (contentGameObject != null)
+                    obj = contentGameObject.gameObject;
+                var text = CommonMethods.EnsureComponent<Text>(obj,true);
+                text.font = mMain.TextFont;
+                mTextObject = text;
+            }
+            ApplyText();
+        }
+        void ApplyText()
+        {
+            SetText(text);
+            SetTextSize(textSize);
+            SetColor(color);
+            SetAlignment(alignment);
+            SetStyle(fontStyle);
+        }
+
+        partial void InnerSetMain();
+        partial void InnerVerifyTextObject();
+
+
+        partial void MediateTextMeshProText(string text);
+        partial void MediateTextMeshProColor(Color color);
+        partial void MediateTextMeshAlignment(TextAnchor alignment);
+        partial void MediateTextMeshSize(int size);
+        partial void MediateTextMeshStyle(FontStyle style);
+
+        partial void CheckTextMesh(ref bool res);
+
+        private void SetAlignment(TextAnchor alignment)
+        {
+            this.alignment = alignment;
+            MediateTextMeshAlignment(alignment);
+            var comp = mTextObject as Text;
+            if (comp != null)
+                comp.alignment = alignment;
+        }
+
+        private void SetStyle(FontStyle style)
+        {
+            this.fontStyle = style;
+            MediateTextMeshStyle(style);
+            var comp = mTextObject as Text;
+            if (comp != null)
+                comp.fontStyle = style;
+        }
+
+        private void SetTextSize(int size)
+        {
+            this.textSize = size;
+            MediateTextMeshSize(size);
+            var comp = mTextObject as Text;
+            if (comp != null)
+                comp.fontSize = size;
+        }
+
+        public override void OnValidate()
+        {
+            mValidate = true;
+            bool create = mTextObject != null;
+            base.OnValidate();
+            if(create)
+                RecreateTextObject(false);
+            ApplyText();
+            mValidate = false;
+        }
+
+        private void SetText(string text)
+        {
+            this.text = text;
+            MediateTextMeshProText(text);
+            var comp = mTextObject as Text;
+            if (comp != null)
+                comp.text = text;
+        }
+
+        private void SetColor(Color color)
+        {
+            this.color = color;
+            MediateTextMeshProColor(color);
+            var comp = mTextObject as Text;
+            if (comp != null)
+                comp.color = color;
+
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerText.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e8bb441f29338d34a9797c452b59e9c1
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 70 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/MonthTextBox.cs

@@ -0,0 +1,70 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Bitsplash.DatePicker
+{
+    public class MonthTextBox : DatePickerText , IDatePickerSettingsItem
+    {
+
+        [SerializeField]
+        private string dateFormat = "MMMM, yyyy";
+
+        public string DateFormat
+        {
+            get { return dateFormat; }
+            set
+            {
+                dateFormat = value;
+                RefreshText();
+            }
+        }
+
+        public int Order { get { return 8; } }
+
+        public string EditorTitle
+        {
+            get { return "Month Text Box - " + gameObject.name; }
+        }
+
+        protected override void SetContent(DatePickerContent content)
+        {
+            if (Content != null)
+                Content.OnDisplayChanged.RemoveListener(DisplayChanged);
+            base.SetContent(content);
+            if (Content != null)
+            {
+                Content.OnDisplayChanged.AddListener(DisplayChanged);
+                DisplayChanged();
+            }
+        }
+
+        void RefreshText()
+        {
+            if (Content == null)
+                return;
+            try
+            {
+                Text = (Content.DisplayDate.ToString(dateFormat));
+            }
+            catch (Exception)
+            {
+                Debug.LogWarning("Invalid date format for text box - " + DateFormat);
+            }
+
+        }
+        void DisplayChanged()
+        {
+            RefreshText();
+        }
+
+        void OnDestroy()
+        {
+            if (Content != null)
+                Content.OnDisplayChanged.RemoveListener(DisplayChanged);
+        }
+
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/MonthTextBox.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 400d813d42c781647b2dc21a32c8ba6a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 21 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextMonthButton.cs

@@ -0,0 +1,21 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    public class NextMonthButton : DatePickerButton , IDatePickerSettingsItem
+    {
+        public int Order { get { return 8; } }
+        public override void RaiseClicked()
+        {
+            if(Content != null)
+                Content.NextMonth();
+        }
+        public string EditorTitle
+        {
+            get { return "Next Month Button"; }
+        }
+
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextMonthButton.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7ffc543322d72b84aa2bf75522e23960
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 21 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextYearButton.cs

@@ -0,0 +1,21 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+namespace Bitsplash.DatePicker
+{
+    public class NextYearButton : DatePickerButton , IDatePickerSettingsItem
+    {
+
+        public int Order { get { return 8; } }
+        public override void RaiseClicked()
+        {
+            if (Content != null)
+                Content.NextYear();
+        }
+
+        public string EditorTitle
+        {
+            get { return "Next Year Button"; }
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextYearButton.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e73eb1b556ab0be46880c15138df96d4
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 20 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevMonthButton.cs

@@ -0,0 +1,20 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    public class PrevMonthButton : DatePickerButton , IDatePickerSettingsItem
+    {
+        public int Order { get { return 8; } }
+        public override void RaiseClicked()
+        {
+            if (Content != null)
+                Content.PrevMonth();
+        }
+        public string EditorTitle
+        {
+            get { return "Prev Month Button"; }
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevMonthButton.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 195f418039695ea4095364cf24d4c3b3
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 20 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevYearButton.cs

@@ -0,0 +1,20 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+namespace Bitsplash.DatePicker
+{
+    public class PrevYearButton : DatePickerButton , IDatePickerSettingsItem
+    {
+        public int Order { get { return 8; } }
+        public override void RaiseClicked()
+        {
+            if (Content != null)
+                Content.PrevYear();
+        }
+        public string EditorTitle
+        {
+            get { return "Prev Year Button"; }
+        }
+
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevYearButton.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3681ff00dc435a443b306c4f1595e340
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 64 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/SelectionTextBox.cs

@@ -0,0 +1,64 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+namespace Bitsplash.DatePicker
+{
+    public class SelectionTextBox : DatePickerText , IDatePickerSettingsItem
+    {
+        public string DateFormat = "ddd, MMM d";
+        public string Seperator = " ... ";
+        public string NothingSelectedString = "";
+
+        public int Order { get { return 8; } }
+
+        protected override void SetContent(DatePickerContent content)
+        {
+            if (Content != null)
+                Content.OnSelectionChanged.RemoveListener(SelectionChanged);
+            base.SetContent(content);
+            if (Content != null)
+            {
+                Content.OnSelectionChanged.AddListener(SelectionChanged);
+                SelectionChanged();
+            }
+        }
+        void RefreshText()
+        {
+            if (Content == null)
+                return;
+            try
+            {
+                string text = NothingSelectedString;
+                if (Content.Selection.Count > 0)
+                {
+                    text = Content.Selection.GetItem(0).ToString(DateFormat);
+                    if (Content.Selection.Count > 1)
+                    {
+                        text += Seperator + Content.Selection.GetItem(Content.Selection.Count - 1).ToString(DateFormat);
+                    }
+                }
+                Text = text;
+            }
+            catch (Exception)
+            {
+                Debug.LogWarning("Invalid date format for text box - " + DateFormat);
+            }
+
+        }
+        void SelectionChanged()
+        {
+            RefreshText();
+        }
+
+        void OnDestroy()
+        {
+            if (Content != null)
+                Content.OnSelectionChanged.RemoveListener(SelectionChanged);
+        }
+        public string EditorTitle
+        {
+            get { return "Selection Text Box - " + gameObject.name; }
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/SelectionTextBox.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7e9c89daa2cd8eb4881510775ec65c5a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 22 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/TodayButton.cs

@@ -0,0 +1,22 @@
+using Bitsplash.DatePicker;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    public class TodayButton : DatePickerButton , IDatePickerSettingsItem
+    {
+        public int Order { get { return 8; } }
+        public override void RaiseClicked()
+        {
+            if (Content != null)
+                Content.Selection.SelectOne(DateTime.Today);
+        }
+        public string EditorTitle
+        {
+            get { return "Today Button"; }
+        }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/TodayButton.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 88e9aaf8039021e4cadc9e31971b0dba
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 18 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/YearCombo.cs

@@ -0,0 +1,18 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class YearCombo : MonoBehaviour
+{
+    // Start is called before the first frame update
+    void Start()
+    {
+        
+    }
+
+    // Update is called once per frame
+    void Update()
+    {
+        
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/YearCombo.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dd88d254a331aba41bda202e8c92f4c8
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 6c935428eb94cf646acf92ce8b730b98
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 15 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/DatePickerCulture.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public enum DatePickerCulture
+    {
+        StandardEnglish,
+        Current,
+        Custom
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/DatePickerCulture.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4811c86bb6bb11f4695785ab8bdce2da
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 19 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/FrameLayout.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public enum FrameLayout
+    {
+        Top,
+        Bottom,
+        TopAndBottom,
+        Right,
+        Left,
+        RightAndLeft,
+        Full
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/FrameLayout.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bf4183d35228bb9448e07eabfa4072ba
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 14 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TextTypeEnum.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public enum TextTypeEnum
+    {
+        StandardText,
+        TextMeshPro
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TextTypeEnum.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 821dcfed7c0fc3040844ab37271d346f
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 16 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleButtons.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public enum TitleButtons
+    {
+        Month,
+        MonthAndYear,
+        YearOnly
+    }
+
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleButtons.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6591e6862c6316244973c7fbb9cac356
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 15 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleDate.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public enum TitleDate
+    {
+        Label,
+        Combo
+    }
+
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleDate.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7eb270964dd07394eb8ad59f351208e9
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 16 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleLayout.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public enum TitleLayout
+    {
+        None,
+        Side,
+        Center,
+    }
+
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleLayout.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 59403a7c645a0ee4caa53dcb17509c58
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 25 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/WeekDaysLayout.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public enum WeekDaysLayout
+    {
+        /// <summary>
+        /// do not show week day names
+        /// </summary>
+        None,
+        /// <summary>
+        /// show short week day names
+        /// </summary>
+        Short,
+        /// <summary>
+        /// show full week day names
+        /// </summary>
+        Full
+    }
+
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/WeekDaysLayout.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e7f42e0187e34f241be0beb7358826a3
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 17 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerPrivate.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    interface IDatePickerPrivate
+    {
+        void RaiseClick(int childIndex);
+        void RaiseStartSelection(int childIndex);
+        void RaiseSelectionEnter(int childIndex, int fromChildIndex);
+        void RaiseSelectionExit(int childIndex, int fromChildIndex);
+        void EndSelection();
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerPrivate.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ea67901e275547845aa9b6b92fbc9ee9
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 14 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerSettingsItem.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public interface IDatePickerSettingsItem
+    {
+        String EditorTitle { get; }
+        int Order { get; }
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerSettingsItem.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6f964946c10134c4da0f7bd6a0bbdc13
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 13 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/IDateTimeItem.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using UnityEngine;
+
+namespace Bitsplash.DatePicker
+{
+    public class IDateTimeItem : MonoBehaviour
+    {
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/IDateTimeItem.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1623b4afd126e4b45b113279fe6bb809
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 6 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/MonoBehvaiour.cs

@@ -0,0 +1,6 @@
+namespace Assets.Calendar
+{
+    internal class MonoBehvaiour
+    {
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/MonoBehvaiour.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 82d87da444320464aae7b597605ab9bb
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 14 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/MultipleSelectionInputValue.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public enum MultipleSelectionInputValue
+    {
+        Singular,
+        Append
+    }
+}

+ 11 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/MultipleSelectionInputValue.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 60c0ba85e00abac409ef820e1e0f1275
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 15 - 0
Assets/Bitsplash/Modular Date Picker/Base/Script/SelectionType.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Bitsplash.DatePicker
+{
+    public enum SelectionType 
+    {
+        Single,
+        Range,
+        Multiple
+    }
+}

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff