...
This commit is contained in:
10
Blazor.PersianDatePicker/Enums/Align.cs
Normal file
10
Blazor.PersianDatePicker/Enums/Align.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace Blazor.PersianDatePicker
|
||||
{
|
||||
public enum Align
|
||||
{
|
||||
Right,
|
||||
Left
|
||||
}
|
||||
}
|
27
Blazor.PersianDatePicker/Enums/Calendar.cs
Normal file
27
Blazor.PersianDatePicker/Enums/Calendar.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
|
||||
namespace Blazor.PersianDatePicker
|
||||
{
|
||||
public enum Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// Both Jalali (Persian) and Miladi (Gregorian) calendars, with default set to Jalali
|
||||
/// </summary>
|
||||
DualModeJalaliDefault,
|
||||
|
||||
/// <summary>
|
||||
/// Both Jalali (Persian) and Miladi (Gregorian) calendars, with default set to Miladi
|
||||
/// </summary>
|
||||
DualModeMiladiDefault,
|
||||
|
||||
/// <summary>
|
||||
/// Only Jalali (Persian) calendar
|
||||
/// </summary>
|
||||
SingleModeJalali,
|
||||
|
||||
/// <summary>
|
||||
/// Only Miladi (Gregorian) calendar
|
||||
/// </summary>
|
||||
SingleModeMiladi
|
||||
}
|
||||
}
|
48
Blazor.PersianDatePicker/Enums/DateFormat.cs
Normal file
48
Blazor.PersianDatePicker/Enums/DateFormat.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable once CheckNamespace
|
||||
|
||||
namespace Blazor.PersianDatePicker
|
||||
{
|
||||
public enum DateFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// e.g. 1400/01/01
|
||||
/// </summary>
|
||||
[Display(Name = "YYYY/MM/DD")]
|
||||
yyyy_slash_MM_slash_dd,
|
||||
|
||||
/// <summary>
|
||||
/// e.g. 1400-01-01
|
||||
/// </summary>
|
||||
[Display(Name = "YYYY-MM-DD")]
|
||||
yyyy_dash_MM_dash_dd
|
||||
}
|
||||
|
||||
public static class DateFormatExtensions
|
||||
{
|
||||
public static string GetCSharpFormat(this DateFormat format)
|
||||
{
|
||||
if (format == DateFormat.yyyy_slash_MM_slash_dd)
|
||||
return "yyyy/MM/dd";
|
||||
|
||||
if (format == DateFormat.yyyy_dash_MM_dash_dd)
|
||||
return "yyyy-MM-dd";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static string GetSeparator(this DateFormat format)
|
||||
{
|
||||
if (format == DateFormat.yyyy_slash_MM_slash_dd)
|
||||
return "/";
|
||||
|
||||
if (format == DateFormat.yyyy_dash_MM_dash_dd)
|
||||
return "-";
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
22
Blazor.PersianDatePicker/Enums/DigitType.cs
Normal file
22
Blazor.PersianDatePicker/Enums/DigitType.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace Blazor.PersianDatePicker
|
||||
{
|
||||
public enum DigitType
|
||||
{
|
||||
/// <summary>
|
||||
/// For dual calendar mode, will change based on current calendar
|
||||
/// </summary>
|
||||
BasedOnCalendar,
|
||||
|
||||
/// <summary>
|
||||
/// e.g. ۱۴۰۰/۰۱/۱۱
|
||||
/// </summary>
|
||||
Persian,
|
||||
|
||||
/// <summary>
|
||||
/// e.g. 1400/01/11
|
||||
/// </summary>
|
||||
English
|
||||
}
|
||||
}
|
11
Blazor.PersianDatePicker/Enums/IconPosition.cs
Normal file
11
Blazor.PersianDatePicker/Enums/IconPosition.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace Blazor.PersianDatePicker
|
||||
{
|
||||
public enum IconPosition
|
||||
{
|
||||
BasedOnAlign,
|
||||
Right,
|
||||
Left
|
||||
}
|
||||
}
|
23
Blazor.PersianDatePicker/Enums/PickerTheme.cs
Normal file
23
Blazor.PersianDatePicker/Enums/PickerTheme.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace Blazor.PersianDatePicker
|
||||
{
|
||||
public enum PickerTheme
|
||||
{
|
||||
[Display(Name = "default-theme")]
|
||||
Default,
|
||||
|
||||
[Display(Name = "dark-theme")]
|
||||
Dark,
|
||||
|
||||
[Display(Name = "blue-theme")]
|
||||
Blue,
|
||||
|
||||
[Display(Name = "cheerup-theme")]
|
||||
Cheerup,
|
||||
|
||||
[Display(Name = "redblack-theme")]
|
||||
RedBlack
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user